JS 如何添加数组元素?

let arr = new Array();

arr.push('cows');

console.log(arr);
// 预期输出: ['cows']

你可能感兴趣的:(JS 如何添加数组元素?)