-5
Hello, Good night!
I am on a platform of studies in which exercises and tests are performed, the statement is:
Sets the function today Magazine, which receives by parameter a string that informs the day of the week. This function should return"Today is football day!!!" if parameter is "Sunday", otherwise it should return "Today is not football day :(".
I made the following code:
function hojeSeJoga(diaDaSemana) {
if (diaDaSemana == "domingo") {
return 'Hoje é dia de futebol!!!';
} else {
return 'Hoje não é dia de futebol :('
}
}
And the platform reports that:
Your solution worked, but there are things to improve
Objectives that were not met:
Today Jooga makes comparisons against strings
Results of the test: Today June("Sunday") should say if you play
Today June("Tuesday") should say that he does not play
What is missing?
Thank you!
May I ask what platform is this? It is raining similar questions here, this same one has been asked in other ways 4 times.
– bfavaretto
Wow, mine is Digital House.
– Jeh
Thank you. These are many similar questions. Perhaps this school is indicating the site for students to ask questions. From what I saw of the questions equal to yours, it is not clear if these requirements (how to avoid comparing to string) are explicit from the beginning. Because if they’re not, I’d consider the exercise bad. Besides, if it’s to avoid comparing it to string, it would be nice to have you explain why, instead of trying to stick a myth in your head. Anyway, good luck in school.
– bfavaretto
They are not clear, the exercise statement is like this. So there are several doubts and errors at the time of the test. Thank you!
– Jeh
@bfavaretto the exercises are all terrible and the impression is that they are deceiving the people who are doing.
– Maniero
It’s really the case that we stay tuned, there’s a lot of junk testing coming from that platform, and I’ve seen a lot of bad tests lately.
– Bacco