add method to Function.prototype

by ellhn

JavaScript

Function.prototype.delay = function (num) {
  setTimeout (this, num)
}
function bar (){
  console.log("Hello");
}
function foo (){
  console.log("Hi!");
}
//bar.delay(2000);
//foo.delay(4000);