Recently i have been asked to write a javascript function (it was a coding test) where they wanted me to implement a function which will add and return the values.
add(3,2);//should return 5
add(3)(2); //should return 5
I am not sure whether this is possible at all. I am not an expert in javascript so could get any clue from google search.