Created
April 27, 2019 16:35
-
-
Save upupming/2b336e72d7013371886d96df6a2f0c95 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
let a = [ | |
{ | |
width: 0, | |
height: 1 | |
}, | |
{ | |
width: 2, | |
height: 3 | |
}, | |
] | |
let b = a[0] | |
b.width = 3 | |
console.log(a) | |
// [ { width: 3, height: 1 }, { width: 2, height: 3 } ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment