- Published on
자바스크립트 Tips
- Authors

- Name
- dwook
- ?? 연산자는 왼쪽 피연산자가 null 또는 undefined일 때만 오른쪽 피연산자를 반환
- || 연산자는 왼쪽 피연산자가 falsy 값에 해당할 경우, 오른쪽 피연산자를 반환
//* 1부터 31까지
export const dayList = Array.from(Array(31), (_, i) => String(i + 1));
//* 2020년부터 1900년까지
export const yearList = Array.from(Array(121), (_, i) => String(2020 - i));
얕은 복사, 깊은 복사
- Shallow Copy
Object.assign({}, 대상객체)
{...대상객체}
- Deep Copy
import _ from 'lodash'
_.cloneDeep(대상객체)