AP Principles Logo

PX_doubleJavascript_lastname

Instructions

Complete the following assignment.

Drill down to your class under your google drive.
Create a text file using notepad.
Click on this to see how notepad can used to create your html document.
File name is PX_doubleJavascript_lastname.html

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Student Info Prompt</title>
</head>

<body>
  <h1>Student Information</h1>
  <p id="output"></p>

  <script>
    // Prompt the user for their name
    let studentName = prompt("What is your name?");

    // Prompt the user for their grade level
    let gradeLevel = prompt("What is your grade level?");

    // Create a message to display both inputs
    let message = "Hello, " + studentName + "!<br>" +
                  "You are in grade " + gradeLevel + ".";

    // Display the message on the webpage
    document.getElementById("output").innerHTML = message;
  </script>
</body>
</html>
The name of the file will be: PX_doubleJavascript_lastname

Files to save in your google drive under your class name
and to Submit to (Google Classroom)