일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- middleware
- tailwindcss
- web
- SSR
- CLASS
- node.js
- express.js
- solidity
- Props
- 기준
- API
- nextJS
- graphQL
- concept
- hardhat
- evm
- HTML
- Redux
- JavaScript
- built in object
- 삶
- CSS
- REACT
- error
- Interface
- Ethereum
- useState
- bitcoin
- blockchain
- typeScript
- Today
- Total
목록JavaScript (53)
ReasonJun
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...
array const fruits = new Array('apple', 'banana', 'cherry'); console.log(fruits); // [ 'apple', 'banana', 'cherry' ] const fruits1 = ['apple', 'banana', 'cherry']; console.log(fruits1); // [ 'apple', 'banana', 'cherry' ] console.log(fruits[0]); // apple // 'from' has the iterable property, so it iterates. array = Array.from('text'); // copy console.log(array); // [ 't', 'e', 'x', 't' ] array = A..
truthy / falsy if (0) { console.log('true'); } if ('0') { console.log('true'); // true } // false // 1) false // 2) 0 // 3) null // 4) undefined // 5) NaN // 6) '' // 7) 0n const fruits = ['apple', 'banana']; if (fruits) { console.log('item here'); // item here } const fruits1 = []; if (fruits1.length) { console.log('item here'); // } object // Object literal { key: value } // new Object() // Ob..
const string1 = 'Hello'; const string2 = 'Hello'; const string3 = `Hello ${string1}`; console.log(string3); // Hello Hello const number = -123; console.log(number + 1); // -122 console.log(number + undefined); // NAN console.log(typeof (number + 1)); // -122 console.log(typeof (number + undefined)); // number const a = 0.1; const b = 0.2; console.log(a + b); // 0.30000000000000004 // Floating Po..