JavaScript Functions
A pure function returns a result from its inputs and changes nothing else.
Example
const triple = (n) => n * 3;
console.log(triple(2));
Your task
Write sum(a, b) and log sum(2, 3).
JavaScript & TypeScript
A pure function returns a result from its inputs and changes nothing else.
const triple = (n) => n * 3;
console.log(triple(2));
Write sum(a, b) and log sum(2, 3).
Press Run to see the result.