Loading...
beginner
Problem 03 • Step 02
Equality and Inequality
Now add two more comparison operators: equality (==) and inequality (!=).
These let the evaluator check whether two values are the same or different:
evaluate([3, "==", 3]) // -> true
evaluate([3, "!=", 3]) // -> false
evaluate([[1, "+", 1], "==", 2]) // -> true
Same pattern as before — evaluate both sides, then compare. Fill in the "l == r" and "l != r" rules.