React to the User
Explore how to interact with users by capturing input using prompt(), combining it with text through string concatenation, and updating your web page dynamically. This lesson teaches you to display personalized messages on the page or in alerts, making your JavaScript applications more engaging and user-focused.
We'll cover the following...
We'll cover the following...
Let’s make JavaScript feel like a real conversation. In this lesson, you’ll ask the user something using prompt(), and use what they say to update your page or show a message.
Goal
You will learn to:
Get user input with
prompt().Display the input in an alert or on the page. ...