A list of hints for the challenges in the Else If Statements lesson..
Last updated - July 23, 2024
Checkpoint | Check that both "if" and "else if" have conditions, and "else" doesn't |
School Grade Guesser |
Did you prompt the user for what level of school they are in? Did you check if their response was "Elementary" and log a statement? Did you check if their response was "Middle" and log a statement to the console? Did you check if their response was "High" and log a statement to the console? Did you check if their response was "College" and log a statement to the console? Did you log a statement to the console otherwise? |
Driving |
Did you prompt the user to check if they have a permit, license, or none? Did you properly check if they have a permit and log a statement to the console? If they don't have a permit or license, did you log a statement to the console that they need to work on their permit? |
Let's Go Fishing |
Did you prompt the user for their age and the number of fish caught? Did you alert them to keep fishing if the user is 12 or younger, and haven't caught more than 10 fish? Did you alert them to keep fishing if the user is greater than 12, and they haven't exceeded the 6 fish limit? Did you alert them to stop fishing once the maximum amount of fish have been caught? |
Scoreboard |
Did you get the two different scores from the user? Did you check if the score of the first team was less than the second team and alert them? Did you check if the scores were the same and alert them? Did you alert them congratulations otherwise? |
The Bonus |
Did you correctly get the number of sales from the user? Did you alert them of a $500 bonus if they made more than 100 sales? Did you alert them of a $250 bonus if they made more than 50 sales? Did you alert them of not getting a bonus otherwise? |
Color Combinations |
Did you get two different colors from the user that they would like to combine? Did you check to see if it was one of the three combinations? Did you check to see if it was another possibility of the combinations? Did you handle the third and possible combination? Did you alert the user of the new color combination using concatenation? (i.e - "Red and Yellow make Orange") |
Homework Reminder |
Did you create a button with the attribute onClick Did you properly declare your function "homework"? In your function, did you prompt the user 4 times asking if they had completed their english, math, history, and science homework? alert( ) else { } |
For more help with JavaScript, check out our JavaScript Reference Guide!