DEV Community

19 JavaScript Array Methods Everyone Needs to Know

OpenSource on November 25, 2023

🟢 🟢 🟢 Green Methods Adding and Removing Elements push(): Adds one or more elements to the end of an array and retu...
Collapse
 
manchicken profile image
Mike Stemle • Edited

I wish this wasn’t just a list of headings. I read it and didn’t feel like I learned anything other than what you are promoting.

Mozilla Developer Network (MDN) has this documentation and more, with explanations and comparability notes. It can be found here: developer.mozilla.org/en-US/docs/W...

Collapse
 
opensourcee profile image
OpenSource • Edited

Ow, it’s a compilation, yes. I’m sorry you didn’t like it. And thanks for the link. 👍

Collapse
 
sreno77 profile image
Scott Reno

Very good information but I don't understand the colors. What does "Green" mean vs "Blue"?

Collapse
 
opensourcee profile image
OpenSource

Thank you, I’m glad. The colora are just a way of naming the groups in an easier to remember way. But feel free to ignore it and keep the “subtitle” only.

Collapse
 
dannyengelman profile image
Danny Engelman
Collapse
 
musfiquahaque profile image
Musfiqua haque

Very understable and clear concept. I just like it. It's out of this world.

Collapse
 
opensourcee profile image
OpenSource

I'm happy to read this. Thank you, my friend.

Collapse
 
nerro profile image
Nerro

Nice post pal.
Really informative and well ordered.
Thank you for this!

Collapse
 
cyrusakwaboahemmanuel profile image
Promising Notes

Thank You 🙏🏾

Collapse
 
buchslava profile image
Vyacheslav Chub

What about Array.splice?

Collapse
 
opensourcee profile image
OpenSource • Edited

I should probably add it to green:

🟢 🟢 🟢

Green Methods

Adding and Removing Elements

splice(): Changes the contents of an array by removing or replacing existing elements and/or adding new ones.

// Syntax: array.splice(start[, deleteCount[, item1[, item2[, ...]]]])
let months = ['Jan', 'March', 'April', 'June'];
months.splice(1, 0, 'Feb');
// Inserts 'Feb' at index 1: ['Jan', 'Feb', 'March', 'April', 'June']
months.splice(4, 1, 'May');
// Replaces 1 element at index 4: ['Jan', 'Feb', 'March', 'April', 'May']
Enter fullscreen mode Exit fullscreen mode
Collapse
 
ahmedandroi profile image
Ahmedandroi

Thank you

Collapse
 
dvalin99 profile image
Domenico Tenace

Clear article, thanks for share 🙏🏻

Collapse
 
glntn101 profile image
Luke

Thank you 👍

Collapse
 
opensourcee profile image
OpenSource

Thank you!

Collapse
 
tree profile image
Root

Thank you on this artical

Collapse
 
nathanb profile image
Nathan Bridgewater

Very concise and clear good job my friend.

Collapse
 
opensourcee profile image
OpenSource

Thank you! Wrote for myself and though… why not sharing?

Collapse
 
opensourcee profile image
OpenSource

GitHub logo webcrumbs-community / webcrumbs

Create and modify React websites and applications with a no-code interface and powerful plugins, enriched by the community. 🌟 Star to support our work!

Catch the Latest Innovations: Get Your Monthly Dose of WebCrumbs Insights

WebCrumbs open graph

WebCrumbs logo

The next evolution in React-based web development

License GitHub Discussions Open Issues GitHub contributors Open for contribution

Wiki Architecture Manifesto Motivation Thoughts Uniqueness FAQ Comparison

Countries

WebCrumbs at X   WebCrumbs at Discord

WebCrumbs concept

WebCrumbs open graph

Quick actions:

Introduction

WebCrumbs aspires to be an industry-standard solution for React applications, positioned as the "WordPress for React." Whether you're a developer or not, you'll find it effortless to create, manage, and scale your React-based websites using our intuitive admin panel.

Your Support Matters
If you find value in what WebCrumbs aims to achieve, consider starring ⭐️ us on GitHub. Your endorsement is crucial in helping us refine our product and grow our community. Star WebCrumbs on GitHub.

Key Features

  • Plugin Platform: Integrate and manage React plugins to extend functionality effortlessly.
  • No-Code Admin Panel: Control every aspect of your…