-3
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 :(".
function hojeSeJoga(diaDaSemana) {
if (diaDaSemana === "domingo") {
return 'Hoje é dia de futebol!!!';
} else {
return 'Hoje não é dia de futebol'
}
}
Guys this formula is giving error you can help me!
The question remains very poorly formulated. How do you call the function to test? What is the value of the parameter diaDaSemana - numeric, string, date...? Did you notice that you are comparing a variable to itself (hojeSeJoga == hojeSeJoga)? You have noticed that this variable is the function name itself, and therefore it cannot contain the name of a day?
– epx