Created
May 19, 2011 04:54
-
-
Save evantahler/980212 to your computer and use it in GitHub Desktop.
Chrome console.log note
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
/////////////// | |
// Chrome Console wackyness | |
// It seems that objects that can be rendered to "Strings" (strings and numbers) will render with console.log | |
// However, obects that are "interpreted" graphically will be shown in the state they are at the conclusion of runtime (or whatever their state is when being viewed). | |
// Example: | |
var TestObject = new Object; | |
TestObject.name = "name 1"; | |
console.log(TestObject) // will show the name attribue as "name 2" when viewed in chrome | |
console.log(TestObject.name) // will show "name 1" as expected | |
TestObject.name = "name 2"; | |
console.log(TestObject) // will show the name attribue as "name 2" as expected | |
console.log(TestObject.name) // will show "name 2" as expected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment