Put in order · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

Array Basics - push() Method Syntax

Arrange the elements of adding an item to an array:

Items to put in order

  • .push(
  • 'Stegosaurus'
  • )
  • species
Show the answer

Correct order:

  1. species
  2. .push(
  3. 'Stegosaurus'
  4. )