by Nathan
map 추가/조회/수정/삭제 반복문확인
1234567891011121314var aMap = new Map();aMap.set("aa", "value");aMap.set("bb", "value");aMap.set("cc", "value");aMap.size; // 3aMap.get("dd"); // undefinedaMap.has("dd"); // falseaMap.delete("aa");aMap.clear(); // 전체삭제 // 확인용aMap.forEach(function(value, key){ console.log(key + " = " + value);});Colored by Color Scriptercs
Programming/JavaScript, Json
2018. 8. 28. 16:07