Challenge Hints: If Statements

A list of hints for the challenges in the If Statements lesson.

Last updated - June 30, 2023

 

Checkpoint

Check that you have a condition inside "()".  Did you use two equals signs? ==

Check for a condition after the "if" and no condition after the "else"

The Rollercoaster

Did you correctly get the users height?

Did you properly check to see if the user is below the height requirement?

Did you execute a statement if the user met the height requirement?

Did you properly alert the user with the correct phrases?

Reading Log

Did you properly define your function which should get the number of minutes read from the user?

Did you see if the number of minutes read is 30 or greater and alert them?

Did you alert them otherwise?

Did you call your function at least twice?

Vending Machine

Did you prompt the user for the amount they would like to spend?

Did you check if they are willing to spend more than $1.25?

Knowing they want to spend more than $1.25, did you check if they want to spend more than $1.50?

Did you execute the statement if they weren't willing to spend $1.25

Did you log what the user is able to buy for each conditional?

For more help with JavaScript, check out our JavaScript Reference Guide!