0
Why this happen if score is 18 console send good
var score = parseInt(readLine(), 10) /* 88 and above => excellent 40-87 => good 0-39 => fail */ // tu código va aquí if(score>=88){ console.log("excellent") }else if((score <= 87) && (score => 40)){ console.log("good") }else if(score <40){ console.log("fail") }//Error var score = parseInt(readLine(), 10) /* 88 and above => excellent 40-87 => good 0-39 => fail */ // tu código va aquí if(score>=88){ console.log("excellent") }else if((score <= 87) && (score > 40)){ console.log("good") }else if(score <40){ console.log("fail") }//No error
1 Odpowiedź
+ 2
In your first snippet, you have a typo when writing >= operator, you wrote it as => (in the first else...if block)
else if( ( score <= 87 ) && (score => 40 ) ) // <---- this line