[JS] array.includes 사용시 주의점

SINGING BIRD·2023년 4월 17일

includes 메소드에서 두개의 배열을 비교하는 경우,
레퍼런스를 체크하므로,
모양이 같아도 false 결과를 출력한다.

console.log( [[1,2]].includes([1,2]) )
// false
profile
good things take time

0개의 댓글