Code for add(1)(2)
Code for add(1)(2)
function add(x) {return function (y) {return x + y;};}
Alternative syntax
const add = (x) => (y) => x + y;
function add(x) {return function (y) {return x + y;};}
Alternative syntax
const add = (x) => (y) => x + y;