console.trace — A better alternative to console.log

1 · Amit Merchant · Aug. 13, 2021, 11:02 a.m.
If you ask me what is that one thing that I (over)use when working with JavaScript, the only answer you’ll get is console.log(). The console.trace() method Advantages You can use the console.log() method to output messages to the web console. The message may be a single string (with optional substitution values), or it may be one or more JavaScript objects. It’s like a swiss army knife that you can use in every scenario you imagine but the most probable scenario when you want to reach this met...