Skip to content

Instantly share code, notes, and snippets.

@icodesido
Created March 15, 2017 12:21
Show Gist options
  • Save icodesido/24ff6b0dfa71b160b3549a23c25b9f07 to your computer and use it in GitHub Desktop.
Save icodesido/24ff6b0dfa71b160b3549a23c25b9f07 to your computer and use it in GitHub Desktop.
Nifty Console Tricks
// 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