반응형
Map: Array를 다른 Array로 변환
매개변수는 순서대로 currentValue[, index[, array]]인듯
매개변수 이름을 중요하지 않고 순서만 중요한듯... 헷갈리는 개념!!! 알아두자!!!
참고) https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/map
반응형
'js > js syntax' 카테고리의 다른 글
[numberCheck] /^\d+$/.test(확인대상-문자열, 문자열아니면 문자열로 자동변환) Number.isInteger(확인대상-숫자, 그중에서도 정수만 true 1.0도 true) (0) | 2024.04.01 |
---|---|
javascript true/false (0) | 2022.08.31 |
js reduce function (0) | 2022.08.22 |
js empty array check: arr?.length===0 (객체이면 arr.length는 undefined) (0) | 2022.07.11 |
js template literal에서 삼항연산자(a?b:c, ternary operator) 사용 (0) | 2022.06.02 |