标签:length cti search 查找 i++ val key span turn
function findIndexByKeyValue(arr, key, valuetosearch) { for (var i = 0; i < arr.length; i++) { if (arr[i][key] == valuetosearch) { return i; } } return -1; }
标签:length cti search 查找 i++ val key span turn
原文地址:https://www.cnblogs.com/shuihanxiao/p/13140125.html