$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #64

What is the output?

console.log(-7 % 3);
  1. -1
  2. 2
  3. 1
  4. -2
JavaScript's remainder keeps the dividend's sign — the opposite of Python.
Play Problem Solving ▸