JSFiddle - React, Tailwind, and code Playground

by divyanshu013

JavaScript

// write a function called `partial` that uses the `add` function and makes the following snippet work
function add( a, b ) {
  return a + b;
}

// add function here
function partial(fun1, init_val) {

}

// this should work
var add5 = partial( add, 5 );
add5( 4 ); // 9
add5( 3 ); // 8