sdras / array-explorer

⚡️ A resource to help figure out what JavaScript array method would be best to use at any given time
https://arrayexplorer.netlify.com/
MIT License
2.62k stars 241 forks source link

indexOf: fromIndex #81

Open petetalksweb opened 5 years ago

petetalksweb commented 5 years ago

I feel like indexOf's optional second parameter: fromIndex, is an unsung hero.

It has saved me many times from having to slice an array before calling indexOf.

Would you consider a PR with an example using fromIndex?

sdras commented 5 years ago

absolutely! it would be great if you could explain/show it in a way that didn't cloud newcomers understanding of indexOf.

The other thing is updating the languages. We could either drop it into google translate or just leave it different, I'm open to either.

I look forward to it!

amanchauhan98 commented 3 years ago

Indexof ? I can't understand!! plaese somebody elobrate this.