📅  最后修改于: 2022-03-11 15:01:19.798000             🧑  作者: Mango
let myList = ["apples", "lemons", "oranges"];
let randomIdx = Math.floor(Math.random() * myList.length);
let randomItem = myList[randomIdx]
console.log(randomItem) // Ex: "lemons"