Javascript – Currying function which retains value using closure
I was asked in an interview to write a currying function which retains value using closure(Javascript). Example: add(1, 2, 3)(4)(5, 6); add(7, 8); add(9)(10); add(); Output of above line of code should be 55 after execution of last add function.…