Coding Challenge: Adding a New Property to a Character

Apply what you’ve learned about objects in the coding exercises in this lesson.

We'll cover the following

Problem statement

Given a code, can you add an ‘experience’ property to the character? Solve this exercise on your own.

Improve the RPG program to add an experience property named xp to the character. Its initial value is 00. Experience must appear in the character description.

Coding exercise

Get hands-on with 1400+ tech skills courses.