Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function.prototype.myBind = function(context) {
- if (typeof this == "object") {
- for (var prop in this) {
- if (this.hasOwnProperty(prop) && typeof this[prop] == "function") {
- return function() {
- var args = arguments;
- return this[prop].apply(context, args);
- };
- };
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment