You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
function arrayLastIndexOf (list, val) {
|
|
if (list.lastIndexOf) {
|
|
return list.lastIndexOf(val)
|
|
}
|
|
for (var len = list.length - 1; len >= 0; len--) {
|
|
if (val === list[len]) {
|
|
return len
|
|
}
|
|
}
|
|
return -1
|
|
}
|
|
|
|
module.exports = arrayLastIndexOf
|
|
|