Tell us what’s happening:
can someone explain:
var partialFn =impartial.bind(this,1,2);
partialFn(10);
so first we declare partialFn as a Variable and then below we use it as a function. I’ve never seen this before. How can a variable be used as a function also?
Your code so far
function add(x) {
// Add your code below this line
// Add your code above this line
}
add(10)(20)(30);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application