Code Studio · Level 7
Object Challenge
Create your own object with at least three properties, then print a useful message from it.
Write your own object.
Example code
let game = {
title: "Star Rescue",
goal: "pick up the star",
lives: 3
};
say(game.title);
say("Goal: " + game.goal);
say("Lives: " + game.lives);
Program result
- Run your code to see output.
Type real JavaScript, then run it.
Object challenge complete.
You created a JavaScript object and used its named properties in output.
Next Lesson