EraCode practice

Pick a Price Badge with Conditional (Ternary) Logic

JavaScriptintermediateMulti-Part

Summary

Quick practice on conditional logic in JavaScript: understand when a ternary is appropriate, then use one to generate a UI-friendly label from a number.

Problem preview

### Goal Fill the single missing line so returns a short label for a UI. - If is **0**, return **"Free"** - Otherwise return **"$" + price** (e.g., 25 → "$25") - Assume is a non-negative integer (hap…

Attempt this challenge

Sign in to attempt the full challenge with timed AI grading, hints, and test feedback.