Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок0
Something is wrong!!! Please HELP!!!
Complete the code to output "vacation", if the given month is August. Don't output anything otherwise. My code…. var month = parseInt(readLine(), 10) //console.log(month); if (month =="August") { console.log("vacation") }
3 ответов
+ 3
Is it the code project from javascript course?
The given code in the default is misleading. You need to remove the parseInt() – the task description shows that a string input is expected.
+ 1
correct code is:
var month = readLine()
if(month == "August") {
console.log("vacation")
}
else {
console.log("")
}
0
Okay,but as you can see, at the bottom of the if i have comented the console.log(month), and when i run the program without comment, it shows NAN(i thought as you said, but after runing console.log(mounth), just for checking i got confused))).