Javascript 배열과 유사배열
Javascript 배열과 유사배열 var nums = [1,2,3]; var nodes = document.querySelectorAll('div'); // NodeList [div, div, div, div, div, ...] var els = document.body.children; // HTMLCollection [noscript, link, div, script, ...] Array.isArray(nums); // true Array.isArray(nodes); // false Array.isArray(els); // false 출처: https://www.zerocho.com/category/JavaScript/post/5af6f9e707d77a001bb579d2 nodes, els 처럼 [..
2020. 2. 5.