Arrays in JavaScript
Arrays are like shopping lists or to-do lists in JavaScript. They keep things in order, and you can put anything in them: words, numbers, even other lists!
Every item in an array has a position number, starting from 0 (yes, computers count from 0!). Let's learn step by step with simple examples you can try right now.
How to Create an Array
Just put things inside square brackets [] and separate them with commas.
See? The console shows the whole list! 🎉
Getting Items from an Array
Use the position number (called index) inside square brackets. Remember: first item is 0!
Changing Items in an Array
Arrays are flexible – you can change any item whenever you want!
How Many Items? – The length Property
Every array knows how many items it has – just ask with .length!
Arrays Inside Arrays (Nested)
You can even put arrays inside arrays – like a grid!
Quick Fun Quiz
Az anyagokat átnéztük és ellenőriztük, de hibák továbbra is előfordulhatnak. A tartalom kizárólag oktatási célt szolgál, ezért saját felelősségre használd, és szükség esetén ellenőrizd más forrásokkal is.
✨ Kérdezd Larát — a tanulási partnered
Fedezd fel a személyre szabott tanulási támogatást. Lara elmagyarázza az anyagot, összefoglalja a témákat és megválaszolja a kérdéseidet — az Go csomagtól elérhető.
Lara segít gyorsabban tanulni — kizárólag a ReadyTools Go, Plus és Max tagoknak.


