📌  相关文章
📜  如何从javascript代码示例中的数组中获取随机语句

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

代码示例4
// List your array items
let Testing1 = ["put","things","here"]
let Generate = Math.floor((Math.random() * Testing1.length)); // Generates a number of the array.

// logs the result
console.log(Testing1[Generate])