在js中,请问[,,,,,]的长度是多少?

33 阅读1分钟

"在 JavaScript 中,[,,,,,] 的长度是 5。

const arr = [,,,,,];
const length = arr.length;
console.log(length); // 输出 5

"