在 JavaScript 中,创建数组主要有两种方式:数组字面量和 new Array() 构造函数。
new Array()
[]
// 创建包含不同类型元素的数组 let mixedArray = [10, 'hello', true