How the JavaScript Ternary Operator Works

The Ternary Operator is a JavaScript operator that allows you to save a lot of code typing on if/else statements.