📌  相关文章
📜  javascript 将元素添加到数组 - Javascript 代码示例

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

代码示例6
const langages = ['Javascript', 'Ruby', 'Python'];
langages.push('Go'); // => ['Javascript', 'Ruby', 'Python', 'Go']

const dart = 'Dart';
langages = [...langages, dart]; // => ['Javascript', 'Ruby', 'Python', 'Go', 'Dart']