0
Vacation Month Javascript exercise
I cannot specify the otherwise statement. Some ideas?
8 Antworten
+ 5
Can you please link your code?
Do you mean the else statement?
+ 2
Longhua68
No need of else part just change the line of input to this:
var month = readLine();
As "August" is a String so need to parse with parseInt. Mostly users didn't use their brain here. 😃😃
+ 1
Exactly! Because in this lesson the else statement was not introduced yet I thought there was another way even if logic says an if always pair with an else. But even by using the else statement how can I leave it without an output as specified in the instructions? In any case, the code I am using is not taken by the system. Pls. see my code hereafter: var month = parseInt(readLine(), 10)
//your code goes here
if (month == "August"){
console.log ("vacation");
} else {console.log("")}
+ 1
Thank you AJ.
0
If you don't want any output for "else" why don't you leave the else-part out?
0
Sorry, i have no clue
0
Are. We supposed to have studied this in the course?