let music = 'on';
let phone = 'on';
if (music === 'off' || phone === 'off'){
console.log('Music or phone is off');
} if (music === 'on' && phone === 'on') {
console.log('music is playing');
} if (music === 'off') {
console.log('music is off');
} if (phone === 'off') {
console.log('phone is off');enter code here
} if (music === 'off' && phone === 'off') {
console.log('Both Phone and Music if off');
} else {
console.log('Dont know why music is not playing');
}
It is displaying the else statement no matter what I only want it to display the else statement if if none of the if statements apply.