반응형
각 array의 엘리먼트마다 제공된 함수를 실행
메일 주소에서 @과 그 뒤에 있는 것들은 없애고 싶을 때
See the Pen temp04 by hwd3004 (@hwd3004) on CodePen.
@ 뒤에꺼 필요없으면
See the Pen temp05 by hwd3004 (@hwd3004) on CodePen.
See the Pen temp06 by hwd3004 (@hwd3004) on CodePen.
map은 forEach지만 반환된 엘리멘트들로 새로운 array를 만듬
implicit return 으로 코드 한줄로 가능
See the Pen temp07 by hwd3004 (@hwd3004) on CodePen.
객체로 하고 싶을때
반응형
'ES6' 카테고리의 다른 글
HTML Fragments (0) | 2020.09.17 |
---|---|
Default Values (0) | 2020.09.17 |
filter() - includes() (0) | 2020.09.14 |
find() - includes() (0) | 2020.09.14 |
arrow function을 사용하지 않아야할 때. 'this' (0) | 2020.09.09 |