Can you still?

Is this a pure function?

function sum(a, b) {
  return a + b;
}

You missed this one before

A pure function is a function that always returns the same result, if the same arguments are passed.

The sum function always returns the same result. If we pass 1 and 2, it will always return 3 without side effects. If we pass 5 and 10, it will always return 15, and so on. This is the definition of a pure function.

Question 77 · see the original (opens in a new tab)