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.

  1. Forcefully update their level property to exactly 50.
  2. Return the entirely updated player object.

01EXAMPLE 1

Inputplayer = { name: "Rookie", level: 1 }
Output{ name: "Rookie", level: 50 }

Constraints

  • Update the object property directly.
FundamentalsObjects
JavaScript
Loading...
3 Hidden

Input Arguments

player{"level":10}

Expected Output

{"level":50}

Click RUN to test your solution