+ 1
Help. The if statement
You are planning a vacation in August. You are given a program that takes the month as input. Task Complete the code to output "vacation", if the given month is August. Don't output anything otherwise. Sample Input August Sample Output vacation
5 Respostas
+ 5
Jade Merabela Fabiaña
Just write
var month = readLine ();
+ 2
your attempt?
+ 2
var month = parseInt(readLine(), 10)
//your code goes here
if (month == "August") {
console.log ("vacation");
}
what's wrong with this code can you tell please
+ 2
solution :
console.log(readLine()=='August'?'vacation':'')
problem:
Remove parseInt() it's convert string into int
+ 1
i got it people thanks for helping me out!