If statement: Else if

Let year = prompt('In which year was ECMAScript-2015 specification published?', '');

if (year < 2015) {
  alert( 'Too early...' );
} else if (year > 2015) {
  alert( 'Too late' );
} else {
  alert( 'Exactly!' );
}

To test several variants of a condition.

If statement: Else if — Structure map

Clickable & Draggable!

If statement: Else if — Related pages: