Goal: In the Functions lesson, we learned:
alert()
, prompt()
, and confirm()
Functions are an incredibly important part of programming, and you'll be using them constantly. Begin to get the hang of calling some common JavaScript functions by completing the practice exercises listed below.
alert()
, confirm()
, and prompt()
functions in JavaScript?Practice using JavaScript functions:
alert()
to pop up a dialog box with a warning for the user.confirm()
to ask a yes or no question.prompt()
to ask a question.prompt()
as a variable. All responses entered by a user into a prompt input are saved as strings (even if the user enters 10, the value is saved as the string, "10"). Run at least 3 string methods of your choice on the string variable that you create from the prompt.
Lesson 26 of 65
Last updated May 23, 2022