📜  追加一个数组 - Javascript 代码示例

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

代码示例3
//Use push() method
//Syntax: 
array_name.push(element);
//Example: 
let fruits = ["Mango", "Apple"];
//We want to append "Orange" to the array so we will use push() method
fruits.push("Orange"); 
//There we go, we have successfully appended "Orange" to fruits array!