The Shape Shifter

Easy+20 XP

Mission Briefing

The shape-shifting mimic has entered the arena! You must demonstrate your ability to track its changing forms by updating a tracker variable.

The Concept: Dynamic Reassignment

Unlike const, variables declared with the let keyword are mutable. They can be updated and reassigned to hold new values as the program runs.

The Objective

Your function receives a parameter newValue.

  1. Declare a variable named data using let and initially set it to "Old".
  2. Reassign the data variable to hold the string provided in newValue.
  3. Return the data variable.

01EXAMPLE 1

InputnewValue = "Dragon"
Output"Dragon"

Constraints

  • Use let for declaration.
FundamentalsVariables
JavaScript
Loading...
3 Hidden

Input Arguments

newValue"Dragon"

Expected Output

Dragon

Click RUN to test your solution