The Stat Modifier
Easy+15 XP
Mission Briefing
The Guild master has authorized an emergency promotion! You must update a recruit's profile and instantly boost their level to exactly 50 so they can enter the raid.
The Concept: Object Mutation
You can dynamically change or add new values to an object at any time. By assigning a new value to an existing key using dot notation, the old value is overwritten.
Example: user.age = 26; // Updates age to 26
The Objective
Your function receives a player object.
- Forcefully update their
levelproperty to exactly 50. - Return the entirely updated
playerobject.
01EXAMPLE 1
Input
player = { name: "Rookie", level: 1 }Output
{ name: "Rookie", level: 50 }Constraints
- Update the object property directly.
FundamentalsObjects
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
player{"level":10}
Expected Output
{"level":50}Click RUN to test your solution