Hello. I try to use a switch statement, but it prints me only the default block code and I don’t understand why. 75 value doesn’t match with case 3 as it should. What is wrong with my code?
let response;
let score = 75;
let machineActive = false
switch (machineActive === “true”) {
case 0: score < 0 || score > 100
response = “This is not possible, an error has occurred.”;
break;
case 1: score < 20
response = “That was a terrible score — total fail!”;
break;
case 2: score < 40
response = “You know some things, but it’s a pretty bad score. Needs improvement.”;
break;
case 3: score < 70
response = “You did a passable job, not bad!”;
break;
case 4: score < 90
response = “That’s a great score, you really know your stuff.”;
break;
default: response = 'The machine is turned off. Turn it on to process your score.' }
console.log (`Your score is ${score}`)
console.log (response)