运行代码
(Shift+Enter)
HTML教程
奔月教程(runoon.com)
点击按钮获取数组中年龄大于 18 的第一个元素索引位置。
点我
注意:
IE 11 及更早版本不支持 findIndex() 方法。
运行结果