Challenge Hints: Return Statements

A list of hints for the challenges in the Return Statement lesson.

Last updated - July 23, 2024

 

Checkpoint

Did you include a parameter inside the "()"?

Try setting a variable equal to the "prompt()" function

Are you returning the variable from the "prompt()"?

2 truths and 1 lie

Did you declare both of your functions properly?

Did you remember to have your functions log the phrase to the console?

Did you remember to make at least 3 function calls?

Did you remember to alert the user of the boolean returned?

Dog Year Calculator

Did you properly declare and define your function?

Did you prompt the user for the age at least 4 times?

Did you call the function at least 4 times?

Did you correctly log each statement to the console? (X years in dog years is Y)?

The double-decker function

Did you remember to create a function that returns a string?

Did you remember to create a second function that accepts the string parameter and logs a concatenated phrase to the console?

Did you remember to call your second function and have it call the first function as a parameter?

The volume calculator

Did you remember to declare a variable that gets the user's cube size?

Did you declare a function that receives the cube size as a parameter?

Did you have your function compute the volume of the cube and then return it?

Did you remember to alert the user of the volume?

Word Masher

Did you remember to first prompt the user for two words?

Did you properly declare and define your function?

Did you call the prompt function relation at least 3 times?

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