Last active
June 8, 2016 16:12
-
-
Save SangHakLee/2b923eceb209213d76804c226acdd3ae to your computer and use it in GitHub Desktop.
JavaScript variable copy
This file contains 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
// color1의 값을 color2에 저장한다. | |
var color1 ="red"; | |
var color2 = color1; | |
console.log(color1); // "red" | |
console.log(color2); // "red" | |
color1 = "blue" | |
console.log(color1); // "blue" | |
console.log(color2); // "red" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment