skip to Main Content

Javascript – list of map nested in a set

I'm fairly new and trying to understand maps in javascript. I have below code. const topmap = new Map(); const map1 = new Map(); const map2 = new Map(); const set1 = new Set(); map1.set('x','y'); map1.set('a','b'); set1.add(map1); set1.add(map2); topmap.set('ID',set1); console.log(topmap.get('ID').size);…

VIEW QUESTION
Back To Top
Search