DEV Community

Cover image for 10 Unpopular Javascript Array Methods

10 Unpopular Javascript Array Methods

deji adesoga on November 12, 2019

Someone is sitting in the shade today because someone planted a tree a long time ago. -Warren Buffett Introduction Arrays in javascri...
Collapse
 
256hz profile image
Abe Dolinger

Nice. In addition to .every, I also like .some - returns true if any match the callback.

Collapse
 
desoga profile image
deji adesoga

Yeah, I didn't actually include it because it has a high query statistics on google trends. So, I guess it's kind of popular.

Collapse
 
256hz profile image
Abe Dolinger

Makes sense! I really appreciate the data-driven approach (=

Thread Thread
 
desoga profile image
deji adesoga

Thanks very much, Abe.

Collapse
 
mhsangar profile image
Mario Sánchez García

Hi Deji! Nice article, never heard about some of these functions, I'll try to apply them if I see the opportunity 💪

I think you have a typo on the first example. You're using keys() instead of entries(), is that right?

Collapse
 
desoga profile image
deji adesoga

Thanks Mario, I really appreciate it.

Yeah, my github gist was kind of messing up. But you're right, I've fixed the mistake.

Collapse
 
prahladyeri profile image
Prahlad Yeri • Edited

At least isArray(), keys() and reverse() are something which I use pretty often, I don't think they have many substitutes either. I wonder how come they are "unpopular"!

Collapse
 
desoga profile image
deji adesoga • Edited

According to google trends, they are, when you compare them to .map(), .filter() and reduce().

Collapse
 
olayemii profile image
OLayemii

Nice article, thanks for sharing

Collapse
 
desoga profile image
deji adesoga

You're welcome. Thanks.

Collapse
 
patricnox profile image
PatricNox

Very nice article! I love how you structured it, specially the demonstrations.

However,
Seems like the example demo in #1 is the very same as #2? Typo?

Collapse
 
desoga profile image
deji adesoga

Thanks PatricNox, I really appreciate your feedback.

Yeah, I actually mixed up the link for the github gist. Thanks for pointing that out, Its been fixed.

Collapse
 
desoga profile image
deji adesoga

Noted. Thanks for pointing that out. Correction will be made.

Collapse
 
cristhianramirezgd profile image
Cristhian Ramírez

Thanks Deji, great article! Im beginner and this excited me for learn more about methods in javascript!

Collapse
 
desoga profile image
deji adesoga

Glad it did. Thanks. Keep learning Cristhian.