📅  最后修改于: 2022-03-11 15:03:16.033000             🧑  作者: Mango
// To check if an array contains a number
const ratings = [1,2,3,4,5];
let result = ratings.includes(4);
console.log(result); // true
result = ratings.includes(6);
console.log(result); // false