Complete the code to check the value of color using an if statement.
if (color [1] 'red') { console.log('Color is red'); }
Complete the switch statement to handle the case when day is 'Monday'.
switch(day) {
case [1]:
console.log('Start of the work week');
break;
default:
console.log('Another day');
}Fix the error in the if-else statement to correctly check if score is greater than 50.
if (score [1] 50) { console.log('Passed'); } else { console.log('Failed'); }
Fill both blanks to create a switch statement that logs 'Weekend' for Saturday and Sunday.
switch(day) {
case [1]:
case [2]:
console.log('Weekend');
break;
default:
console.log('Weekday');
}Fill all three blanks to create an if-else chain that logs the correct message for fruit.
if (fruit [1] 'apple') { console.log('Apple pie'); } else if (fruit [2] 'banana') { console.log('Banana smoothie'); } else { console.log([3]); }
