Skip to content

Instantly share code, notes, and snippets.

@MajorMokoto
Created January 25, 2012 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MajorMokoto/1675229 to your computer and use it in GitHub Desktop.
Save MajorMokoto/1675229 to your computer and use it in GitHub Desktop.
var yourName = ;
var gender = ;
var result;
//Line 10 starts an if statement
//Nested in this if statement is an if else statement on lines 11 - 15
//This nested if else statement allows us to check another condition
//We close the first if statement at the start of line 16
if () {
if () {
result = "Thanks";
} else {
result = "Please enter male or female for gender.";
}
} else {
result = "Please tell us both your name and gender.";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment