Challenge Hints: Console Logs, Alerts and Prompts

A list of hints for the challenges in the Console Logs, Alerts and Prompts lesson.

Last updated - June 30, 2023

 

Checkpoint

Try setting a new variable equal to the prompt function

Make sure you put an acceptable value into the "alert()" function

Try putting a value into "console.log()"

Journaling

Check to make sure you have 3 different console.log() statements.

Does your console.log() statement start and end with quotation marks?

Is there a semi-colon at the very end of each of your console.log() statements?

If you want to include a quotation mark in your journal entry you have to "escape" it since it is a special character that starts and ends the string. Escape the quotation mark by putting a backslash, \ , before it.3

Weather Report

Did you prompt the user for the weather for the next 5 days?

Did you log the weather for each day to the console?

Do you have an alert statement alert( ) ? 

Say Hello!

Check to make sure you have 3 different alert() statements.

Does your alert() statement start and end with quotation marks?

Is there a semi-colon at the very end of each of your alert() statements?

If you want to include a quotation mark in your alert you have to "escape" it since it is a special character that starts and ends the string. Escape the quotation mark by putting a backslash, \ , before it.

Take Your Order

Did you include console.log and pass it something to log?

Did you call then prompt() function three times, and pass it a question for the user?

Did you call the prompt() function three times? Be sure and include the words "Main Course" "Drink" and "Dessert" in your prompts!

School Calendar

Did you remember to create at least 3 alert statements?

Did you log at least 3 statements to the console?

Did you follow each alert with a prompt asking if the user is going?

For more help with Javascript, check out our Javascript Cheatsheet!