3
What's the difference between `==` and `===` in JavaScript?
TSAsked by Tomás Silva · 16d
I keep seeing both. When should I use which?
I keep seeing both. When should I use which?
Accepted answer
=== compares without type coercion. Prefer it always.
console.log(0 == '0'); // true
console.log(0 === '0'); // falseSign in to answer.