【JavaScript】 애로우 함수 작성 방법
기본 함수
function func(text) {
console.log(text);
}
해봤어

애로우 함수로 작성해 보았습니다.
const test = () => {
console.log('アロー関数書き方');
}
test();
// console.logの結果が返ってくる
해봤어

↑이 쓰는 방법은 생략할 수 있어…
약어
const test2 = () => console.log('test2');
test2();
해봤어

인수가 있는 경우
const test3 = (text) => console.log(text);
test3('test3引数');
//test3引数 が返ってくる
해봤어

↓
이것과 같은 움직임을 하는 생략하지 않는 쓰는 방법
function test4(text) {
console.log(text);
}
test4(1111) //1111
해봤어

Reference
이 문제에 관하여(【JavaScript】 애로우 함수 작성 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/makkkiy/items/fea2bc21f4c4246377d0텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)