Use console.log() like a pro (2020)
Another trick that might be more practical for actually debugging is using the object shorthand. For example, instead of...<p><pre><code>    console.log(x, y);
</code></pre>
which contains the information you need, but lacks any useful context, try...<p><pre><code>    console.log({x, y});
</code></pre>
...which will print out like an object, including the key names.