Created
May 17, 2015 10:29
-
-
Save captainkovalsky/ff5cad07e8e80a42cc1f to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fojikoyape
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
console.clear(); | |
var a = { | |
array: [1], | |
val: 90 | |
}; | |
var b = a; | |
b.val = 10; | |
a.array[0]++; | |
console.log(b.val); | |
console.log(b.array); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">console.clear(); | |
var a = { | |
array: [1], | |
val: 90 | |
}; | |
var b = a; | |
b.val = 10; | |
a.array[0]++; | |
console.log(b.val); | |
console.log(b.array);</script></body> | |
</html> |
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
console.clear(); | |
var a = { | |
array: [1], | |
val: 90 | |
}; | |
var b = a; | |
b.val = 10; | |
a.array[0]++; | |
console.log(b.val); | |
console.log(b.array); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment