📌  相关文章
📜  js 将数组推入数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:43.552000             🧑  作者: Mango

代码示例6
//create an new function that can be used by any array
Array.prototype.second = function() {
  return this[1];
};

var myArray = ["item1","item2","item3"];
console.log(myArray.second());//returns 'item2'