arrowfunction1 화살표 함수 Arrow Function 화살표 함수는 익명함수이다.기존의 익명함수를 매우 간단하게 한줄로 표현할 수 있다. 화살표 함수 작성하는 순서 기억법 1) 코드로 한줄로 바꾼다. 2) function 삭제, { } 삭제, 삭제한 { 위치에 => 를 작성한다. 3) return 을 삭제한다. // Arrow Function// always anonymousconst simplePrint = function(){ console.log('simplePrint');});const simplePrint = () => console.log('simplePrint');const add = function(a, b){ retrun a + b;};const add = (a, b) => a + b;const simpleMultiply = (a, b.. 2021. 1. 15. 이전 1 다음