📌  相关文章
📜  如何在节点 js 中创建数组 - Javascript 代码示例

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

代码示例3
var colors = [ "red", "orange", "yellow", "green", "blue" ]; //Array

console.log(colors); //Should give the whole array
console.log(colors[0]); //should say "red"
console.log(colors[1]); //should say "orange"
console.log(colors[4]); //should say "blue"

colors[4] = "dark blue" //changes "blue" value to "dark blue"
console.log(colors[4]); //should say "dark blue"
//I hope this helped :)