Created
January 19, 2020 17:47
-
-
Save nikli2009/b199d1235e740310ec27ca33ab607f79 to your computer and use it in GitHub Desktop.
JavaScript Initializer
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
var a = { n: 1} | |
a.x = a; | |
console.log(a, a.x); | |
// {n:1, x: { ... }, {n:1, x: { ... }} | |
var b = { n: 1} | |
b.x = b = { n:2}; | |
console.log(b, b.x); | |
// { n:2}, undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment