Tips to save time writing console.log() in JavaScript
Vijay SRJ
Posted on November 12, 2020
console.log() is of great help for debugging Javascript code .
But writing them is time consuming. You can save time by following these two tricks:
-
Enclose variables in curly braces :
console.log({input}) instead of console.log(“input”,input)
Create a global variable and assign console.log() function to it . Use that variable instead of console.log
Demo for the above two :
💖 💪 🙅 🚩
Vijay SRJ
Posted on November 12, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.