back to the lesson

Rewrite 'if' into '?'

importance: 5
result = (a + b < 4) ? 'Below' : 'Over';

Rewrite this if using the ternary operator '?':

if (a + b < 4) {
  result = 'Below';
} else {
  result = 'Over';
}