일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- middleware
- Props
- node.js
- REACT
- Ethereum
- HTML
- Interface
- concept
- web
- JavaScript
- blockchain
- error
- evm
- built in object
- 기준
- graphQL
- CLASS
- hardhat
- useState
- Redux
- API
- 삶
- CSS
- nextJS
- express.js
- tailwindcss
- bitcoin
- solidity
- SSR
- typeScript
- Today
- Total
목록Frontend/Javasciprt (48)
ReasonJun
show data //? .length // Returns the length (number) of an array. const arr = ['a', 'b', 'c']; console.log(arr.length); // 3 //? .at() // Index the target array. console.log(arr[0]); // a console.log(arr.at(0)); // a console.log(arr.at(-1)); // c //? .find() // Returns the first element in the target array that passes the callback test. const arr = [5, 8, 130, 12, 44]; const foundItem = arr.find..
function declaration // function declaration function hello() { console.log('hello'); } hello(); // hello console.log(hello); // [Function: hello] console.log(typeof hello()); // undefined function getNumber() { return 123; } console.log(typeof getNumber); // function console.log(typeof getNumber()); // number // function expression const a = function () { console.log('A'); }; const b = function..
class // class class Fruit { // Constructor: A function called when an object is created with the 'new' keyword. constructor(name, emoji) { this.name = name; this.emoji = emoji; } display = () => { console.log(`${this.name}: ${this.emoji}`); }; } // apple is an instance of the Fruit class. const apple = new Fruit('apple', '🍎'); class User { constructor(first, last) { this.firstName = first; this..
time const data = new Date(); console.log(date); const d1 = new Date(2022, 11, 16, 12, 57, 30); // Dec 16, 2022 12:15:30 //? .getFullYear(), .setFullYear() console.log(d2.getFullYear()); // Extract year only data.setFullYear(2023); // specify the year //? .getMonth() .setMonth() // Returns/specifies the month. (zero-based numbering) //? .getDate() .setDate() // 'Returns / specifies 'day'. //? .g..
object //? Object.assign() // Copies properties from one or more objects to a target object and returns the target object. const target = { a: 1, b: 2 }; const source1 = { b: 3, c: 4 }; const source2 = { c: 5, d: 6 }; const result = Object.assign(target, source1, source2); const result1 = { ...target, ...source1, ...source2, }; console.log(target); // { a: 1, b: 3, c: 5, d: 6 } console.log(resul..
number //? .toFixed() // Returns a number as a character representing a number to the specified decimal notation (number of digits). console.log(num.toFixed(2)); // 3.14 console.log(parseFloat(num.toFixed(2))); // 3.14 => number // .toLocalString() // Returns a number as a character in local language format. const num1 = 100000; console.log(num1.toLocaleString()); // 100,000 => string // Number...