📜  数组 -1 javascript 代码示例

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

代码示例1
//The index of any item that does not exist in an array is -1

//example:
a = ["help","I'm","a","sentient","array"];
a.indexOf("Icecream");//this returns -1