You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to stop making juice and even if I type "no" it still reloads. I checked the code and I realized that in the conditional of the line 26 you use only ONE equal sign. When you use only one equal sign means that you want to declare a variable, so it will return undefined. Therefore it doesn't know what to do so it juts reloads. What you can do is add another equal sign so it reads it as an actual conditional and returns a boolean.
Also, when you add the || symbols as a "or" you juts put the string of the response and happens the same: returns undefined. It's like if you write this:
if("yes"){
location.reload()
}
so in order to fix this other bug you have to write:
I wanted to stop making juice and even if I type "no" it still reloads. I checked the code and I realized that in the conditional of the line 26 you use only ONE equal sign. When you use only one equal sign means that you want to declare a variable, so it will return undefined. Therefore it doesn't know what to do so it juts reloads. What you can do is add another equal sign so it reads it as an actual conditional and returns a boolean.
Also, when you add the || symbols as a "or" you juts put the string of the response and happens the same: returns undefined. It's like if you write this:
if("yes"){
location.reload()
}
so in order to fix this other bug you have to write:
if(makeMoreJuice == "yes" || makeMoreJuice == "y" /* etc */ ){
location.reload()
}
The text was updated successfully, but these errors were encountered: