📜  获取数组节点js中是否有值 - Javascript代码示例

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

代码示例1
myArray = Array(/*element1, element2, etc...*/);

// If the array 'myArray' contains the element 'valueWeSearch'
if(myArray.includes(valueWeSearch))
{
     // Do something
}