1
   

Multiple Condition If-Else Statements in Javascript

 
 
Reply Sun 25 May, 2014 05:30 pm
I want to create a "quiz" with multiple variables that determine results.

1. Male / Female
2. Age: <18 / 19-30 / 31-50 / 50+
3. Single / Married / Married with Children
etc.

If #1=Male, and #2=19-30, and #3=Single, etc. then THIS RESULT comes up. Is that possible with Javascript statements? If so, what level of knowledge would I need?
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 1 • Views: 822 • Replies: 1
No top replies

 
npdule
 
  2  
Reply Mon 7 Jul, 2014 05:19 pm
@elepharoo,
Hi,
yes this is possible and you need basic knowledge of javascript.
This can be done with "prompt" for asking question which user enter and also using if and else statement and also logical operators.
At the end you need to write this results using "document.write" method.

Hope this can help you.
Cheers.
0 Replies
 
 

Related Topics

 
  1. Forums
  2. » Multiple Condition If-Else Statements in Javascript
Copyright © 2025 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 02/05/2025 at 08:50:57