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

Object Literal Syntax

Arrange the elements of an object declaration in JavaScript

Items to put in order

  • obj
  • const
  • =
  • { key: value }
Show the answer

Correct order:

  1. const
  2. obj
  3. =
  4. { key: value }