📌  相关文章
📜  在javascript代码示例中从数组中查找特定对象

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

代码示例1
const friendsList = ["Abir", "Lalkhan", "Lion", "Shamol", "Kabir", "Shabir"];
if (friendsList.indexOf("Lion") != -1) {
    console.log("Lion Exists");
}
//Output: Lion Exists