Last active
February 17, 2018 01:36
-
-
Save inadarei/be320f706293ed637328ab29bf41d699 to your computer and use it in GitHub Desktop.
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
const a = [1,2,3,4,5]; | |
const aCloned = [...a]; | |
aCloned.push(7); | |
console.log(a); | |
console.log(aCloned); | |
const o = { name: "john", lastname: "nelson", skills: "python" }; | |
const oCloned = { ...o }; | |
oCloned.rancher = true; | |
console.log(o); | |
console.log(oCloned); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment