标签:ice 传参 creat art 参数 on() tar 传参数 prototype
function createArr(){ var arr = new Array(); arr.push.apply(arr,arguments); arr.toJoin = function(){ return this.join(","); } arr.toSlice = function(start,end){//start num //end num return Array.prototype.slice.call(this,start,end+1) } return arr; } var c = new createArr("a","b","c","d"); c.toSlice(1,4) //["b", "c", "d"]
标签:ice 传参 creat art 参数 on() tar 传参数 prototype
原文地址:http://www.cnblogs.com/zhujiasheng/p/6219826.html