Home/Tutorials/JavaScript/Arrays Basics

0 of 3 saved

JavaScript5 min read

Arrays Basics

Read this chapter, write the program on this page, then pass a short check to open the next one.

Ordered lists.

Arrays Basics

Arrays are ordered lists with length and many helpers. Indexes start at 0.

  • push/pop mutate the end; shift/unshift the start.
  • length is one past the last index.
  • Prefer immutable map/filter/slice in app code.
const nums = [10, 20, 30];
console.log(nums[0], nums.length);

After you read this chapter, use Write (when available) and Quiz on this page to lock it in.