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

Object Basics - Getter Syntax

Arrange the elements of a getter definition in an object:

Items to click

  • { return this.name; }
  • get
  • fullName()
Show the answer

Correct order:

  1. get
  2. fullName()
  3. { return this.name; }