Welcome to the second Syntax Trap.
Today's all about comparing Arrays and Strings.
console.log([1, 2, 3] == "1,2,3");
What's the result?
- NaN
- true
- false
- TypeError
This one took me a bit to understand when I started to learn JavaScript as I was used to how other programming languages work.
Top comments (0)