Which fix removes the bug?
let x = 5
if (x = 10) {
console.log("ten");
}
- Change
x = 10tox => 10 - Remove the if statement
- Change
x = 10tox == 10 - Use
letinside the if
A single
Play Problem Solving ▸
= assigns; use == (or ===) to compare.