Created
April 17, 2018 14:47
-
-
Save codermarcos/88ee821de24a5ac5e50e5f267c95fafe to your computer and use it in GitHub Desktop.
TypeError cyclic object value
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 = {}; | |
var b = {}; | |
a.b = b; // Cria a referencia em a para o B | |
b.a = a; // Cria a referencia em b para o A, | |
console.log(a); | |
// a: Object { b: [circular object] } | |
JSON.stringify(a); // TypeError: cyclic object value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment