DEV Community

Cover image for 15+ Array Methods in Javascript

15+ Array Methods in Javascript

Tabassum Khanum on September 04, 2022

What is Array in JS? The Array object, as with arrays in other programming languages, enables storing a collection of multiple items und...
Collapse
 
yourmdsarfaraj profile image
MD Sarfaraj •

Nice article, thanks for sharing!!

Collapse
 
codewithtee profile image
Tabassum Khanum •

Welcome I am glad you took the time to read it.

Collapse
 
clay profile image
Clay Ferguson •

I was unaware of a couple of those. Thanks for posting!

Collapse
 
codewithtee profile image
Tabassum Khanum •

I'm glad that you are finding them useful.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
codewithtee profile image
Tabassum Khanum •

Hey Dennis! I used the markdown syntax highlighting and hope the snippets are more readable now.

Collapse
 
lionelrowe profile image
lionel-rowe •

You need to specify the language — ruby is a different language, which is why the highlighting looks wierd — you want js.

```js
const x = js.syntaxHighlight() // comment
```
Enter fullscreen mode Exit fullscreen mode
const x = js.syntaxHighlight() // comment
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
codewithtee profile image
Tabassum Khanum •

Thank you so for much lionel for correcting!

Collapse
 
miguelbarcelo profile image
MiguelBarcelo •

Excellent job, well done!

Collapse
 
zeeshanahmadkhalil profile image
Zeeshan Ahmad Khalil •

Lol I didn't knew shift removes the element I thought it adds in end and unshift adds at start since I use unshift mostly.

Thanks for sharing.

Collapse
 
raguram90 profile image
RamR •

the at method is new to me, thanks for this article.

Collapse
 
sainf profile image
Carlos Nogueira •

beware at as 88% global usage caniuse and node -> 16.6, mdm

But it's nice to know !

Collapse
 
bsantosh909 profile image
Santosh Bhandari •

Great read.

The only thing that I feel a bit off is the mention of .prototype usage.
It's not good to modify anything doing so.

Collapse
 
enriquesource profile image
EnriqueSource •

Great article. Very enlightening. Thanks for sharing

Collapse
 
mjcoder_5 profile image
MJCoder •

Thanks for sharing, a good JS article!

Collapse
 
ifkas profile image
Ivo Culic •

Check this guide for better visualizing the array methods: js-arrays-visualized.com/

Collapse
 
codewithtee profile image
Tabassum Khanum •

This is really amazing! Thank you for sharing.

Collapse
 
mikec711g profile image
Michael Casile •

Nice article w/great examples.

Collapse
 
andrewbaisden profile image
Andrew Baisden •

Excellent article so many Array Methods.

Collapse
 
vilce profile image
Ștefan Vîlce •

excellent article!

So helpful for me.

Collapse
 
nevalinz profile image
Aaron Nevalinz •

Very Important JS resources, I appreciate.

Collapse
 
dovnar profile image
Vik •

klass

Collapse
 
shifath472533 profile image
Shifath Rahman • • Edited

thanks for sharing

Collapse
 
mickeldav profile image
mickeldav •

Very helpfull for me. Thanks a lot.

Collapse
 
samuel2935 profile image
Samuel •

A very good article 👏