Why does the code below doesn't throw a warning/error about variable re-assignment?
I spent a good amount of time debugging something like this because of the trailing comma.
When the code inside the else statement is moved outside of the if scope, it throws the proper error.
Any explanation would be great.
let a
if (false) {
// Nothing
} else {
const b = 100,
a = 10
}
console.log(a)
// undefined