📜  数组长度 javascript 代码示例

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

代码示例6
/*
  Array Methods
  - Length
*/

// Index Start From 0 [ 0, 1, 2, 3, 4 ]

let myFriends = ["Ahmed", "Mohamed", "Sayed", "Alaa"];

myFriends.length = 2;

console.log(myFriends);