Test case details

Preparation Code

<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.8.1/lodash.min.js"> </script> <script>   var lodash = _.noConflict(); </script>
var bindCall = function(f, scope){         return function(){             return f.call(scope, arguments[0]);         }     };     var bindApply = function(f, scope){         return function(){             return f.apply(scope, arguments);         }     };     var bindScope = function(f, scope){         return function(){             return f(scope, arguments[0]);         }     };     var t1 = (function(x) {       return this + x;     }).bind(1);         var t2 = lodash.bind(function(x) {       return this + x;     }, 1);         var t3 = bindCall(function(x) {         return this + x;     }, 1);         var t4 = bindApply(function(x) {         return this + x;     }, 1);         var t5 = bindScope(function(scope, x) {         return scope + x;     }, 1);         var n = {         value: 1,         sum: function(x) {             return this.value + x;         }     }

Test cases

Test #1

t1(1);

Test #2

t2(1)

Test #3

t3(1)

Test #4

t4(1)

Test #5

t5(1)

Test #6

n.sum(1)