일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- SSR
- REACT
- Interface
- Props
- JavaScript
- CSS
- node.js
- API
- useState
- HTML
- tailwindcss
- CLASS
- web
- nextJS
- typeScript
- solidity
- bitcoin
- built in object
- error
- graphQL
- evm
- middleware
- express.js
- 기준
- 삶
- Ethereum
- Redux
- concept
- blockchain
- hardhat
- Today
- Total
목록Frontend/Javasciprt (48)
ReasonJun
Scope In JavaScript, the term "scope" refers to the context in which variables, functions, and objects are declared and accessed. It determines the visibility and lifetime of variables and the availability of functions and objects in different parts of your code. JavaScript has function scope and block scope: Function Scope: Variables declared inside a function are locally scoped, meaning they a..

Only one call stack can be executed at a time. To use it asynchronously, you must use the Web API. So, if you throw the desired callback function to this API, it performs asynchronous work internally, and when it is finished, the callback function is put in the Task Queue. After that, the event loop of the javascript engine monitors the call stack and task queue, and only when the call stack is ..
// key.js export const birthKey = Symbol('Date of birth'); export const emailKey = Symbol('Emails'); // youjun.js import { birthKey, emailKey } from './key'; export default { firstName: 'youjun', lastName: 'park', age: 22, [birthKey]: new Date(1985, 11, 16, 17, 30), [emailKey]: ['thiehis@gmail.com'], }; // main.js import youjun from './youjun.js'; import { birthKey, emailKey } from './key.js'; c..
console.log(1 + 2); // 3 console.log(1 - 2); // -1 console.log(3 * 4); // 12 console.log(10 / 2); // 5 console.log(7 % 5); // 2 console.log(5 ** 2); // 25 console.log(Math.pow(5, 2)); // 25 let text = 'two' + 'string'; console.log(text); // twostring text = '1' + 1; // Adding a number and a string converts it to a string console.log(text); // 11 : string // Unary Operators let a = 5; a = -a; // ..
spread const a = [1, 2, 3]; console.log(...a); // 1 2 3 const b = [4, 5, 6]; const c = a.concat(b); console.log(c); // [ 1, 2, 3, 4, 5, 6 ] const d = [a, b]; console.log(d); // [ [ 1, 2, 3 ], [ 4, 5, 6 ] ] const e = [...a, ...b]; console.log(e); // [ 1, 2, 3, 4, 5, 6 ] const aa = { x: 1, y: 2 }; const bb = { y: 3, z: 4 }; const cc = Object.assign({}, aa, bb); console.log(cc); // { x: 1, y: 3, z:..
while / do while // while let n = 0; while (n < 4) { console.log(n); n += 1; } // 0 // 1 // 2 // 3 // do while do { console.log(n); n += 1; } while (n < 4); // 0 // 1 // 2 // 3 // 4 switch function price(fruit) { switch (fruit) { case 'apple': return 1000; case 'banana': return 1500; default: return 0; } } console.log(price('apple')); // 1000 console.log(price('banana')); // 1500 console.log(pri..