The Stringifier
Easy+15 XP
Mission Briefing
The archaic central computer only understands raw data, but human operators need to read plain English. You must build a translation pipeline.
The Concept: Data Transformation
A very common use for functions is taking data in one format (like booleans) and returning it in another (like strings) specifically for UI rendering or logging.
The Objective
Your function receives a boolean parameter val (true or false).
- If
valistrue, return the exact string "YES". - If
valisfalse, return the exact string "NO".
Constraints
FundamentalsFunctions
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
valtrue
Expected Output
YES
Click RUN to test your solution