Question: lab2.html Lab 2_2 Lab 2_2 with JavaScript 1. Download and extract the lab2_2.html file 2. Open the file in Chrome, right click on the page

 lab2.html Lab 2_2 Lab 2_2 with JavaScript 1. Download and extract

lab2.html

Lab 2_2

Lab 2_2 with JavaScript

1. Download and extract the lab2_2.html file 2. Open the file in Chrome, right click on the page and select Inspect 3. Select the Console tab. It is OK to see file not found error message for now. 4. Type the following JavaScript code line into the console. Click enter after the line the code. let userInput = prompt('What number is your lucky number?'); You should see a new a dialog box that asks your input. You can give a number and click "OK" button. The type in the following line of code and click enter. userInput; typeof(userInput); let luckyNumber = document.getElementById('luckyNumber"); luckyNumber.innerHTML = 'Your lucky number is ' + userInput + "'; alert('Your lucky number is ' + userInput + '.'); Click "OK" button after the last line of code is excuted. Based on your observations of the output and research, answer the following questions a. [1 point] Explain what the prompt() does in the first line of code. b. [1 point] What was returned to the console when you enter userInput? c. [1 point] What is the type of the userInput? d. [1 point] What does alert() do in the last line of code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!