Q.123 - Currying
https://github.com/lydiahallie/javascript-questions#123-whats-the-output
Probably just a point of pedantry, but the function
const add = x => y => z => {
console.log(x, y, z);
return x + y + z;
};
will log 4 5 6 with the given input (4)(5)(6), so the answer of A is correct. However at the end of the explanation it states that "This returns 4 5 6." The function should return 15, but the log output will be as stated.
I'm unsure if this level of pickiness is really worth fixing, but figured I'd raise it to see if anyone else cares about this.
On a similar note of "not sure if worth a change", it might be worth referring to this by the name of "Currying" so that readers can look more into it, where else it gets used, and why it's useful if they want to. Thoughts?
I support the same @jakeherp