xxxxxxxxxx
const guessNumber = 8
const correctAnswer = 8
const message = guessNumber > correctAnswer ? 'The Guess was too High!'
: (guessNumber < correctAnswer) ? 'The Guess was too low!'
: 'Perfect guess!'
console.log(message)
xxxxxxxxxx
var foo = (
bar === 'a' ? 1 : // if
bar === 'b' ? 2 : // else if
bar === 'c' ? 3 : // else if
null // else
);
xxxxxxxxxx
[boolean expression] ? (operation1, operation2) : (operation3, operation4);