Created
January 17, 2019 15:59
-
-
Save ezirmusitua/db4f2ea7c6ab3a8487ec3aeb4149c752 to your computer and use it in GitHub Desktop.
[Prettify object console log] Prettify object console log #javascript #node
This file contains hidden or 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 user = { | |
first: 'John', | |
last: 'Doe', | |
age: 42 | |
}; | |
// plain console log | |
console.log(JSON.stringify(user, undefined, 2)); | |
// or with interpolation: | |
console.log(`User: ${JSON.stringify(user, undefined, 2)}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment