Skip to content

Glossary: React Basics

Ternary operator

Also written: ternary, ? :

The expression `condition ? a : b`, which picks one of two values. It can go inside JSX braces to choose text or elements.

Where the book teaches it

Related terms

Conditional renderingExpression / statement