Click in order · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects
Object Basics - Creating with Literals
Arrange the elements of creating a dinosaur object with a method:
Items to click
- name: 'Rex',
- roar() { return 'ROAR!'; }
- };
- const dino = {
Show the answer
Correct order:
- const dino = {
- name: 'Rex',
- roar() { return 'ROAR!'; }
- };