Quick JavaScript debugging trick:
Instead of console.log(myVar), try:
console.log({myVar})
It wraps the value in an object with the variable name as key. So instead of seeing:
> 42
You see:
> {myVar: 42}
Saves so much time when you're logging multiple values. Works in every browser.