Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to bind multiple value in javascript

var sum = function(a, b, c) { return a + b + c };
var sumAB = sum.bind(null, 1, 5);
var sumC = sumAB.bind(null, 2);

console.log(sumC());
 
PREVIOUS NEXT
Tagged: #bind #multiple #javascript
ADD COMMENT
Topic
Name
9+1 =