array method()1 Array method() 정리 `use strict`; const arr = ['chan', 'mark', 'peter', 'andy', 'sh']; // Array.prorotype.method() 1. length: number; // 1. length: number; // 배열 길이를 가져오거나 설정 // 0부터 시작 console.log('1. ' + arr.length); // arr.forEach((name) => console.log(name)); for(let i = 0; i number): this; // 11. sort(compareFn?: (a: T, b: T) => number): this; // Array 정렬, 반환 // @param compareFunction // 정렬 순서를 정의하는 함수 // 생략 시 .. 2021. 3. 27. 이전 1 다음