Lesson 11 of 35 · +80 xp

Ternary

Inline conditional.

Explained simply

Your task

Declare const label = x > 0 ? "pos" : "neg";

ternary.js
▶ Output (javascript)
Click 'Run code' to execute your code in a real sandbox.
← Back