Spread Syntax - JavaScript Tutorial
1. Creates copies of object with updated values 2. Collects remaining keys off object destructuring 기존 객체변수를 분해해 변수의 키값인 name, age를 바로 사용할 수 있다. 즉, let name = user.name | let age = user.age와 같은 의미이다. 배열 리터럴에서의 전개 var parts = ['shoulders', 'knees']; var lyrics = ['head', ...parts, 'and', 'toes']; // ["head", "shoulders", "knees", "and", "toes"] 배열을 연결하는 더 나은 방법 var arr1 = [0, 1, 2]; var arr2 = [3..
2020. 9. 12.