Our Goal


Goal: To be able to understand this function:
// The .bind method from Prototype.js
Function.prototype.bind = function(){
   var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift();
   return function(){
     return fn.apply(object,
       args.concat(Array.prototype.slice.call(arguments)));
   };
};
Some helper methods that we have:
assert( true, "I'll pass." );
assert( "truey", "So will I." );
assert( false, "I'll fail." );
assert( null, "So will I." );
log( "Just a simple log", "of", "values.", true );
error( "I'm an error!" );[/c
  

你可能感兴趣的:(java,C++,c,prototype,C#)