1. What is the primary difference between == and === in JavaScript?
The loose equality operator (==) allows type coercion before comparison, which can lead to surprising results. The strict equality operator (===) checks both value and type without coercion and is generally safer in most comparisons.
console.log(5 == '5'); // true (coercion) console.log(5 === '5'); // false (different types)