일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- 기준
- evm
- solidity
- web
- built in object
- tailwindcss
- useState
- Props
- CSS
- nextJS
- Redux
- SSR
- REACT
- JavaScript
- middleware
- CLASS
- concept
- express.js
- graphQL
- hardhat
- blockchain
- Ethereum
- error
- node.js
- typeScript
- 삶
- Interface
- bitcoin
- HTML
- API
- Today
- Total
목록전체 글 (369)
ReasonJun
toReserved / toSorted / toSpliced (copy, no mutate) const x = [1, 2, 3]; const y = x.toReversed(); y.push(0) const arr = [1,3,2]; const sorted = arr.toSorted(); console.log(arr); // [1, 3, 2] console.log(sorted); // [1, 2, 3] const a = [ "a", "b", "c", "d"] const newArray = a.toSpliced(1,2) // ['a', 'b'] with const x = ["a", "b", "c", "x"] x[3] = "d" console.log(x) // ["a", "b", "c", "d"] const ..
In JavaScript, there are several array methods that do not mutate the original array. Instead of modifying the array in place, they return a new array with the desired modifications. Here are some commonly used array methods that have non-mutating behavior: concat: The concat() method is used to merge two or more arrays and returns a new array without modifying the existing arrays. const array1 ..
In JavaScript, there are several array methods that can mutate the original array, meaning they modify the array directly instead of creating a new array. These methods allow you to add, remove, or modify elements within an array. Here are some commonly used array methods that have mutating behavior: 1. push: The push() method adds one or more elements to the end of an array and returns the new ..
In JavaScript, the Timer API provides functions and methods to schedule and manage timers. Timers allow you to execute code at specified intervals or after a certain delay. The Timer API consists of two main functions: setTimeout and setInterval, along with their corresponding methods to clear or cancel the timers: clearTimeout and clearInterval. Here's an overview of the Timer API in JavaScript..
In JavaScript, Higher-Order Functions (HoFs) are functions that can take other functions as arguments or return functions as their results. HoFs are a fundamental concept in functional programming and enable powerful and flexible ways to work with functions. Here are some key aspects and characteristics of Higher-Order Functions in JavaScript: Functions as Arguments: HoFs can accept other functi..
//? document.createElement() // Creates and returns a new html element that only exists in memory. const divEl = document.createElement('div'); console.log(divEl); //? E.prepend() / E.append() // Inserts a node as the first or last child of an element. const parentEl = document.querySelector('.parent'); const el = document.createElement('div'); el.textContent = 'Hello'; parentEl.prepend(new Comm..
Search //? document.getElementById() // Returns the element retrieved by the value of the HTML `id` attribute. // If multiple elements are found, only the first element found is returned. // If there are no search results, return null. const el = document.getElementById('child2'); console.log(el); //? document.querySelector() // Returns one element searched for with 'css selector'. // If multipl..
The DOM (Document Object Model) API in JavaScript provides a way to interact with HTML and XML documents. It represents the structure of a document as a tree-like structure, where each node in the tree corresponds to a part of the document, such as elements, attributes, text, etc. The DOM API allows you to manipulate the structure, content, and styling of web documents dynamically. Here are some..
// this binding // 'this' is dynamically determined by the caller! function Hello(name) { this.name = name; this.printName = function () { console.log(`My name is ${this.name}`); }; } function YourName(name) { this.name = name; this.printName = function () { console.log(`Your name is ${this.name}`); }; } const youjun = new Hello('youjun'); const neo = new YourName('neo'); youjun.printName(); // ..
In JavaScript, the this keyword refers to the context in which a function is executed. It is a special keyword that provides a reference to the object on which a method or function is being invoked. The value of this is determined dynamically at runtime based on how a function is called, rather than being lexically bound during the function's definition. The behavior of this depends on the invoc..