Which fix removes the bug?
function isEven(n) {
return n % 2 = 0;
}
- Change
% 2to/ 2 - Add
letbefore n - Change
= 0to=== 0 - Return
n % 2
Comparison needs
Play Problem Solving ▸
===, not the assignment operator =.