Use switch for selecting one of many code blocks to be executed.
Source Code
let fruit = 'apple';
switch(fruit) {
case 'apple':
console.log('Apple is selected');
break;
case 'banana':
console.log('Banana is selected');
break;
default:
console.log('No fruit selected');
}