Tagged: javascript


Currying in javascript

Problem Implement the compound function which returns a function and satisfies the following condition function add10 (a) { return a + 10 } console.log(add10(10)) // 20 console.log(compound(add10)(10)) // 30 Understanding closures, currying, partially applied...


Format the given number into an American currency format

Convert a given number into the formatted number. Logic Traverse the┬ástring in the reverse order Consider the following cases : Positive numbers, Negative numbers, Positive floating point numbers, Negative floating point numbers   Solution