DEV Community

Cover image for ⚡️ When using ES6 here's a few great ways to initialize an Array.
Aaron Reisman
Aaron Reisman

Posted on

1

⚡️ When using ES6 here's a few great ways to initialize an Array.

Top comments (4)

Collapse
 
wannabehexagon profile image
ItsThatHexagonGuy

Did you forget to add content? The thumbnail only shows one way to initialize an array.

Collapse
 
perpetual_education profile image
perpetual . education

Just thinking... this is a good example from that other post..... and what ES would you use?

Collapse
 
lifeiscontent profile image
Aaron Reisman

Hi, sorry. I don't understand your question. Can you please explain?

Collapse
 
lifeiscontent profile image
Aaron Reisman

No, I just wanted to show something short and simple. Technically it's 3 different ways of using the same API.

Gen AI apps are built with MongoDB Atlas

Gen AI apps are built with MongoDB Atlas

MongoDB Atlas is the developer-friendly database for building, scaling, and running gen AI & LLM apps—no separate vector DB needed. Enjoy native vector search, 115+ regions, and flexible document modeling. Build AI faster, all in one place.

Start Free

👋 Kindness is contagious

Discover fresh viewpoints in this insightful post, supported by our vibrant DEV Community. Every developer’s experience matters—add your thoughts and help us grow together.

A simple “thank you” can uplift the author and spark new discussions—leave yours below!

On DEV, knowledge-sharing connects us and drives innovation. Found this useful? A quick note of appreciation makes a real impact.

Okay