js伪数组

 
function log(){
//可以使用 Array. prototype. slice. call(fakeArray)将数组转化为真正的 Array 对象。
      var args = Array.prototype.slice.call(arguments)
      args.unshift("(app)")
      console.log.apply(console,args)
    }
    log("哈哈")
    log("hehe..")

猜你喜欢

转载自blog.csdn.net/u012687612/article/details/111866523
今日推荐