Author: Kavit

Programming shorthands / tricks 0

Programming shorthands / tricks

  Different ways to track the max value while iterating over different values We can use if, ternary operator or Math.max function as shown below. if (val > max) {   max = val...


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...