Created
March 15, 2017 12:21
-
-
Save icodesido/24ff6b0dfa71b160b3549a23c25b9f07 to your computer and use it in GitHub Desktop.
Nifty Console Tricks
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
// Turn content editable | |
document.body.contentEditable=true | |
// Time function execution | |
console.time('myTime'); //Starts the timer with label - myTime | |
for(var i=0; i < 100000; i++){ | |
2+4+5; | |
} | |
console.timeEnd('mytime'); //Ends the timer with Label - myTime | |
//Output - myTime:12345.00 ms | |
// Arrange values of a var as a table | |
var myArray=[{a:1,b:2,c:3},{a:1,b:2,c:3,d:4},{k:11,f:22},{a:1,b:2,c:3}] | |
console.table(myArray) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment