The Functional Vessel
Medium+25 XP
Mission Briefing
The new hover-vehicle is fully assembled, but the ignition switch requires a programmatic trigger! The vehicle's interface contains a built-in function you must activate.
The Concept: Object Methods
A function that is stored directly inside an object as a property is called a method. To run that function, you call it using dot notation followed by parentheses.
Example: console.log("Hello") // 'log' is a method on the 'console' object!
The Objective
Your function receives a car object which guarantees to have a method strictly named start().
- Call that method on the object.
- Return whatever the
.start()method evaluates to.
01EXAMPLE 1
Input
car = { start: function() { return "Vroom" } }Output
"Vroom"Constraints
- Call the method stored inside the object.
FundamentalsObjects
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
car{"start":"___FN___:return 'Vroom!'"}
Expected Output
Vroom!
Click RUN to test your solution