Tips to save time writing console.log() in JavaScript

vijaysrj

Vijay SRJ

Posted on November 12, 2020

Tips to save time writing console.log() in JavaScript

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:

  1. Enclose variables in curly braces :

    console.log({input}) instead of console.log(“input”,input)

  2. Create a global variable and assign console.log() function to it . Use that variable instead of console.log

Demo for the above two :

https://fullstackdeveloper.guru/2020/11/12/how-to-save-time-typing-console-log-statements-in-javascript/

💖 💪 🙅 🚩
vijaysrj
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.

Related