Pergunta de entrevista da empresa Honestbee

How to implement a function that dose this: add(a)(b) = a + b

Respostas da entrevista

Sigiloso

10 de jun. de 2018

function add(a) { return b => a + b }

Sigiloso

29 de jul. de 2018

function add(a){ a=a||0; return function(b){ b = b || 0; return a + b; } }