Create Passing Function Expression Variables as Parameters



Welp, it stands to reason that some people might not want to experience the Hickory Haunted House if the fear is significantly elevated on that day.

The devs need you to check the already-generated fear value for that day, and decide whether it is LOW, MEDIUM, or HIGH. Depending on the severity of the fear, they want a specific confirmation message built inside a function expression, and they want this function expression stored in a variable called fearMessage. (They are sort of picky about implementation).

Then, this fearMessage variable should be passed into a declared function called confirmRide, which is provided for you. Additionally, the results of calling confirmRide should be stored in a variable called startRide (i.e., true, or false, from the user’s confirmation).

The confirmation messages should take on the following formats:

For fear levels less than 200:

Fear Level: LOW
Should be no problem at all...mwahaha.
Still wanna ride?

For fear levels 200 through and including 300:

Fear Level: MEDIUM
You may want to rethink this one, man. MWAHAHA!
Think you'll make it?

For fear levels above 300 and up to 400:

Fear Level: HIGH
ABANDON ALL HOPE!!
Have a death wish?