- 비주얼 설명 추천 블로그(시리즈) : https://www.builder.io/blog/visual-guide-to-nodejs-event-loop
 
자바스크립트 스타일 가이드
자바스크립트
- 코드 테스트하기 좋은 사이트 https://es6console.com/
 
Quokka.jsvscode 플러그인

Name
Tags
ES
비고
string
template
"hello "+myname 대신 `hello ${myname}`
- 백틱(`) 사이의 공백과 줄바꿈까지 하나의 문자열로 처리
string
loop
string for loop
- 
for ... of
- 배열로 변환 후 forEach
forEach로 전달하는 것은 콜백함수이므로 return을 넣어도 되며, forEach를 멈출 수 있는 방법은 예외를 발생시키는 것 외엔 없다!ES2020
- 논리연산자 OR(
||)는 false인 경우 모두에 동작.
- ??는 null 또는 undefined 일 때만 오른쪽 피연산자 반환.data-type
bigInt
ES2019
숫자는 자동으로 number 타입으로 메모리를 할당함.
number범위는 (-2^53 ~ 2^53) 까지.
이를 넘어서는 숫자를 쓰려면 bigInt 타입으로, 숫자 뒤에 'n' 붙이면 됨.operator
== : loose equality, with type conversion
=== : strict equality, no type conversion ← 이거 써라promise
async&await
callback
자바스크립트는 기본적으로 동기처리.
비동기 처리 문법 3가지
- 
콜백, 프로미스, async&awaitJS 추가 팁
- 꿀띠 유틸 함수들 : https://velog.io/@typo/advanced-javascript-functions-to-improve-code-quality ( Debounce, Throttle, Once, Memoize, Curry, Partial, Pipe, Compose, Pick, Omit, Zip )
 
Name
Tags
설명
regex
- https://regex101.com/ ( 그룹핑 할 때는 여기가 더 좋음 )
- https://regexr.com/ ( 문법 공부, 일반적인 경우 여기가 더 좋음 )
util function
const sortBy = (arr, key) => arr.sort((a, b) => a[key] > b[key] ? 1 : a[key] < b[key] ? -1 : 0);util function
const isEqual = (a, b) => JSON.stringify(a) === JSON.stringify(b);util function
const countOccurrences = (arr, value) => arr.reduce((a, v) => (v === value ? a + 1 : a), 0);util function
const wait = async (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));util function
const insert = (arr, index, newItem) => [...arr.slice(0, index), newItem, ...arr.slice(index)];