-3
My exercise reads as follows::
Define the philosophic functionHipster you receive as a parameter: a person’s profession (string)
, nationality (string)
and the number of miles he walks per day (number)
. With these parameters assess whether or not this person is (true / false)
, a philosopher Hipster. Keep in mind that a philosopher Hipster is a Musician, born in Brazil and who likes to walk more than 2 kilometers a day.
I used as code the following:
function filosofoHipster(profissao, nacio, km){
return profissao == "Músico" && nacio == "Brasil" && km >= 2;
}
However, the site returns that, although the solution worked, one of the objectives was not met, and the reason would be the comparison against strings!
Is there any other way to solve this?
Thanks!
Maybe because your comparison is casesensitive? Also has the issue of accents (ignore or not)
– Costamilam
In case the site asks for the accent and the capital, if I take it gives that the exercise has not been solved!
– uirasantos