title | description |
---|---|
Some title |
some desc |
Given the next Mario object:
const player = {
name: "Mario",
level: 21,
lifes: 3,
size: "small",
world: "Bowser's Fury"
}
Use call or apply to execute the next actions to the player:
fireFlower()
shows in the console Fire {name}
.
superMushroom()
shows in the console {name} went from small to super size
and change the player size to super
.
die(reason)
shows in the console {name} died because of {reason}
and decrement by 1 the amount of the player lifes.
(suggested file name: call-apply.js
)