dimanche 7 mai 2017

How can I modify second if in this javascript code?

var age= prompt("How old are you?"); if (age <= 29) { alert("you're still young!")} else(alert("you don't have much time left!"));var plan = prompt("What's your plan for the future?");if (plan = "to achieve all"){ alert("Superb!")} else(alert("you can tell me alright!"))

Hello World!
Could someone tell me how to modify the above code so the second "if" works properly and when the variable plan is equal to a specific string, then it'd give "Superb" alert and otherwise it'd give you "you can tell me alright!"?

Thanks

Aucun commentaire:

Enregistrer un commentaire