Jump to content

tapasa

Members
  • Posts

    5
  • Joined

  • Last visited

tapasa's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. while (sexo !== "h" && sexo !== "H" && sexo !== "M" && sexo !== "m"){ // not done yet}while (sexo !== "h" || sexo !== "H" || sexo !== "M" || sexo !== "m"){ // not done yet} i think in theory the second code must work, was the first thingh i thought, but not, and i cant understand why the first yes and the other not :/
  2. i dont catch it. sry haha, just want to know why && and no ||
  3. Yeah, I understand the first part, but why the && and not ||. Sorry I'm spanish and I dont understand things like this in english haha. I understood the first part, but the condition is var sexo must be one of these, i first thought in || but my teacher told me that the || is not correct and the while never ends, but in && it works, but i think the condition catch all and must be sexo = hHmM, all at same time in &&, and in || the sexo var with one of the condition breaks, but not...this is that i cant understand
  4. //This code above is right, but i cannot understand why, the sexo var must be "h" or "H" or "m" or "M" to break the while. Why if i put || instead of && it doesnt work and stay in the while? - Many thanks for you attention ^^
×
×
  • Create New...