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).

  1. If val is true, return the exact string "YES".
  2. If val is false, return the exact string "NO".

Constraints

    FundamentalsFunctions
    JavaScript
    Loading...
    3 Hidden

    Input Arguments

    valtrue

    Expected Output

    YES

    Click RUN to test your solution