자바스크립트 ES6 3편
*Udemy의The Complete JavaScript Course 2020: Build Real Projects! 참고 1.SPREAD OPERATOR function addFourAges (a, b, c, d) { return a + b + c + d; } var sum1 = addFourAges(18, 30, 12, 21); console.log(sum1); //ES5 var ages = [18, 30, 12, 21]; var sum2 = addFourAges.apply(null, ages); console.log(sum2); //ES6 const sum3 = addFourAges(...ages); console.log(sum3); const familySmith = ['John', 'Jane', ..
JavaScript
2020. 8. 7. 14:54