forEach

김현주·2022년 10월 31일
0
for(let i=0; i< a.length; i++) {
함수(a[i], i)
}

a=[10,11,12,13,14,15]
a.forEach(function(v,i){
  console.log(v, i, this);
}, [1, 2])

v=value, i=index인듯 하다

profile
코딩을 배우는 주니어개발자입니다

0개의 댓글