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

·

1 min read

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 :

fullstackdeveloper.guru/2020/11/12/how-to-s..