It looks like the original functionality of Array.lastIndexOf was what I’m looking for, but it was changed. Any idea how to replicate the old functionality?
http://blog.sugarjs.com/post/8452749291/v0-9-2-indexof-lastindexof-fixed
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After looking at the sugar.js docs, it appears that
Array#findIndexdoes the reverse of what I’m trying to do, so here’s my solution which uses that: