Array.prototype.each = function(fn)
{
return this.length ? [fn(this.slice(0,1))].concat(this.slice(1).each(fn)) : [];
};

[1,2,3,4].each(function(x){
document.write(x + "<br/>");
});

相关文章:

  • 2022-01-07
  • 2021-11-12
  • 2021-12-15
  • 2022-12-23
  • 2021-11-26
  • 2021-11-07
猜你喜欢
  • 2021-11-23
  • 2021-08-23
  • 2022-12-23
  • 2021-12-01
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案