① 기본 (17) 썸네일형 리스트형 ES5 자주 사용하는 문법 정리 Array.isArray() Array.isArray() 메서드는 인자가 Array인지 판별합니다. Array.isArray([1, 2, 3]); // true Array.isArray(Array.prototype); // true Array.prototype은 스스로도 배열입니다 Array.isArray({foo: 123}); // false Array.isArray('foobar'); // false Array.isArray(undefined); // false // instanceof vs isArray // Array 객체를 판별할 때, Array.isArray는 iframe을 통해서도 작동하기 때문에 instanceof 보다 적합합니다. // 아래 코드를 실행하면 지원하지 않는 환경에서도 Arr.. 이전 1 2 3 다음