ArrayMethod

Frontend Developer/Javascript

[Javascript] Array Methods- map() and forEach() function

1️⃣ map() 와 forEach()의 공통점: 모든 요소에 콜백함수를 호출 각 요소를 순회하며 요소에 무언가를 할 수 있음 JavaScript .forEach() and .map(): These are the methods that are used to iterate on an array, more technically they invoke the provided callback function for every element of an array. Syntax: forEach((currentElement, indexOfElement, array) => { ... } map((currentElement, indexOfElement, array) => { ... } ) Parameters: curren..

hyejin.frontend
'ArrayMethod' 태그의 글 목록