// var map1 = new Map();
// map1.set('a',1);
// map1.set('b',2) ;
// map1.set('c',3) ;
// console.log(map1.get('a'));
// map1.set('a', 222)
// console.log(map1.get('a'))
// console.log(map1.size)
// console.log(map1.delete('c'))
// console.log(map1)
var m = new Map() ;
m.set(('A', ['B']), ('B', ['A', 'C']), ('C', ['B']));
/* This code had been working fine with Map. Whenever, I was assigining it the values individually it was accepting
it. But when I did it is, it is just calling the second object value.*/
// m.set('A', ['B']) ;
// m.set('B', ['A', 'C']);
// m.set('C', ['B']);
console.log(typeof(m)) // Object
console.log(m) // { ['B'] => ['A', 'C'] }
Can someone help me to understand this?