$ ./guess_the_languageProblem Solving — fix the bug
Problem Solving — fix the bug · easy · #5

Which fix removes the bug?

let x = 5
if (x = 10) {
  console.log("ten");
}
  1. Change x = 10 to x => 10
  2. Remove the if statement
  3. Change x = 10 to x == 10
  4. Use let inside the if
A single = assigns; use == (or ===) to compare.
Play Problem Solving ▸