Tiny Bunny
[TIL] Week 4 Map Object & JS Function
·
🕊️ DevCourse/Backend
🗺️ Map ObjectKey (id)Value (productName) _ String1"Notebook"2"Cup"3"Chair"4"Poster"let db = new Map()db.set(1, "NoteBook")db.set(2, "Cup")db.set(3, "Chair")db.set(4, "Poster")지난번 Map 실습에서는 String만 담았다. 이번에는 "객체"를 담아보도록 하자Key (id)Value (productName) _ Object1"Notebook" / 2000002"Cup" / 30003"Chair" / 1000004"Poster" / 20000let notebook = { productName : "Notebook", price : 20000000}let cup..
민리버
'자바스크립트' 태그의 글 목록