Skip to content

Latest commit

 

History

History

universal-sum

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Write a function that takes two numbers and returns their sum. The function can be called like below:

sum(11, 19); // 30
sum(11)(19); // 30
sum(11)()(19); // 30
sum(11)()()()(19); // 30
sum(11)()()()()()()()()()(19); // 30
sum()()()(11)(19); // 30
sum()()(11)()(19); // 30
sum()(11)()(19); // 30
sum()()()()(11)()()()()(19); // 30