Last active
July 10, 2020 23:39
-
-
Save gulshanzealous/15d98e8487f920c9e59b37ccf34394d7 to your computer and use it in GitHub Desktop.
// source https://jsbin.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var arr = [9, 4]; | |
var myMap = new Map(); | |
myMap.set("name", arr); | |
var newMap = new Map(myMap); | |
// newMap.set("name","shraddha") | |
arr.push(5); | |
myMap.forEach(function (value, key) { | |
console.log(key + " : " + value); | |
}); | |
newMap.forEach(function (value, key) { | |
console.log(key + " : " + value); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment