The Treasure Map
Easy+15 XP
Mission Briefing
The Grand Explorer has returned with a mysterious manifest! You must parse the data and extract the hero's true identity from the records.
The Concept: Object Basics
An Object is a collection of related properties, organized entirely by key-value pairs. To access a specific value, you simply call the key using "dot notation". Example:
const user = { name: "Ali", age: 25 }; console.log(user.name); // Returns "Ali"
The Objective
Your function receives an object hero.
- Use dot notation to access the property exactly named "alias".
- Return that property's value.
01EXAMPLE 1
Input
hero = { alias: "Dark Knight" }Output
"Dark Knight"Constraints
- Access the property via dot notation.
FundamentalsObjects
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
hero{"alias":"Batman"}
Expected Output
Batman
Click RUN to test your solution