<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    Array.prototype.map = function(fn){
        for (i=0;i<this.length;i++){
          v = this[i];
          k = i;
          fn(v,k,this)
        }

    }
//      console.log(Array.prototype.map);
    var arr = [111,222,333];
    arr.map(function(v,k){
        console.log(v,k)
    })
</script>
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
相关资源
相似解决方案