mardi 1 novembre 2016

Jquery if/else statement confusion

I'm thinking about making a small semi-game where you respond to a mysterious void about things. The user sees a question on-screen, types a response in the textbox and clicks the reply button, and the script replies.

My main problem is to understand the logic behind all this.

For example:

Do you like apples? A1:Yes A2:No

if(yes){
say this
} else if(no){
say that
}

What would be the appropriate syntax in this case? Because i'm really really confused right now, it may seem like a very noob-question, but jQuery is getting on my nerves.

Aucun commentaire:

Enregistrer un commentaire