一、该题知识点 1.数组方法 - indexOf() 返回值: 返回在数组中可以找到一个给定元素的第一个索引 若不存在,则返回-1。 语法: array.indexOf ( searchElement , fromIndex ) 参数: searchElement(必须): 被查找的元素 fromIndex(可选): 开始查找的位置(不能大于等于数组的长度,返回-1),接受负值,默认值为0。 注意:indexOf()不能识别NaN var a = [1,2,4,3,4,5] console.log(a.indexOf(4)) // 2 console.log(a.inde...