Last active
July 17, 2016 04:38
-
-
Save yannbertrand/15bf4fe13b8f17bba332 to your computer and use it in GitHub Desktop.
Some console tips
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
| /** | |
| * console.log | |
| */ | |
| console.log('Hello'); | |
| // → "Hello" | |
| var hello = 'Hello'; | |
| console.log(hello); | |
| // → "Hello" | |
| var world = 'World'; | |
| console.log(hello, world, '!'); | |
| // → "Hello" "World" "!" | |
| /** | |
| * console.time & console.timeEnd | |
| */ | |
| console.time('counter'); | |
| // → counter: timer started | |
| // Some long operations | |
| console.timeEnd('counter'); | |
| // → counter: 5820.91ms | |
| /** | |
| * console.table | |
| */ | |
| var object = [ | |
| { | |
| title: hello, | |
| content: 'Good morning everyone' | |
| }, | |
| { | |
| title: world, | |
| content: 'Planet Earth' | |
| } | |
| ]; | |
| console.table(object); | |
| // Let the magic happen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment