📜  如何将变量添加到数组 - Javascript 代码示例

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

代码示例2
// how to add variables/string/value to an array in Javascript

const addArray = [
  "Hello",
  "My",
  "Name",
  "is"
];

// add/append new value/variable/string to the array
addArray.push("Chetan");

console.log(addArray);