JavaScript Shortcut for If and Else if Statement.

preview_player
Показать описание
The easiest way to write an if and else if statement in JavaScript, below is the shortcut code displayed in the video:
const gender = prompt ("enter gender");
gender == "female" ? alert ("Hey girl") : alert ("Hey boy");

Check out the full video on my channel,
Рекомендации по теме
join shbcf.ru