Function.prototype.partial = function () { var fn = this, args = Array.prototype.slice.call(arguments) ; return function() { var newArgs = Array.prototype.slice.call(arguments); return fn.apply(this,args.concat(newArgs)); } }