Javascript - Challenge
📖 Read the lesson
Code Life
By Pierre Marsaa
Codémon Card
Build a complete Codémon object.
1.
Properties:
name
"Metachu"
,
type
"metal"
,
level
10,
hp
90,
moves
[
"Iron Punch"
]
2.
describe()
returns
"Metachu (metal) - level 10, 90 HP"
built from its own properties
3.
learn(move)
adds the move to its list and prints
"Metachu learned X!"
4.
levelUp()
increases the level by 1 and the HP by 10
5.
Call
learn
with
"Steel Wing"
, call
levelUp
, then print the description and
"Moves: N"
↗️
Loading editor...
↶
▶️ Run
↷
💡 Show Solution
Continue