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...    console.log(x, y);

which contains the information you need, but lacks any useful context, try...    console.log({x, y});

...which will print out like an object, including the key names.