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

Which fix removes the bug?

function isEven(n) {
  return n % 2 = 0;
}
  1. Change % 2 to / 2
  2. Add let before n
  3. Change = 0 to === 0
  4. Return n % 2
Comparison needs ===, not the assignment operator =.
Play Problem Solving ▸