Northcentral Technical College Introduction To Programming
10-152-310
Introduction to Programming with JavaScript NTC 10-152-310

Learning Plan 5 5.1 Lab 3

# 5.1 Lab 3

#### File: /Learning Plan 5/5.1lab3.html

### Student

- Name:
- Section:
- Email:

### Lab Steps

1. Open this file in Firefox and Microsoft Visual Studio
2. Add your name, section, and email
3. Open the file /Learning Plan 5/jsFiles/5.1lab3.js in Microsoft Visual Studio
4. Create a JavaScript program that asks a user to enter something five times.
5. Variable declarations section
   1. Write a comment that identifies this coding section.
   2. Declare a `counter` variable.
   3. Declare a variable to hold the string from the user.
6. Assignments section
   1. Write a comment that identifies this coding section.
   2. Assign the counter variable the value zero (0).
7. Processing Section
   1. Write a comment that identifies this coding section.
   2. Use a `while` loop and the counter variable.
   3. In the `while` boolean expression test if the loop counter is less than 5.
   4. In the loop you should:
      1. Prompt the user for an entry and assign it to the string variable.
      2. Display what the user entered on the page.
      3. Increment the loop counter.

### Example Output

    You entered: Hi,
    You entered: looping
    You entered: is
    You entered: very
    You entered: cool.

### Your Output: