MicrolearnENPTES

Arrays and objects

Lesson 12 of 20 · Web.Micro

Lists of things and things with properties: the shapes almost all data takes.

["Espresso", "Latte", "Mocha"] is an array. menu[0] is the first item, menu.length the size, and menu.push("Tea") adds to the end. for (const item of menu) visits each item.

Check yourself

What is ["a", "b", "c"][0]?

Do it in the browser: a real HTML, CSS and JavaScript tool, a short mission and instant feedback. No install.

Start this lesson — free
← Decisions and loopsChanging the page →

All lessons · Web.Micro