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

Learning Plan 6 6.2 Assignment 1

# 6.2 Assignment 1

#### File: /Learning Plan 6/labs/6.2assignment1.html

### Student

- Name:
- Section:
- Email:

## Part 1

1. Open this file in Firefox and Microsoft Visual Studio
2. Add your name, section, and email
3. Open the file "/Learning Plan 6/jsFiles/6.2assignment1.js"
4. Locate the function named "assignment62_1()".
5. Add code after the line: `// PART 1: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise.
6. Part 1 Steps
   1. Write an application that will sum all the elements in an array of numbers.
   2. Create an array of numbers that is at least 10 numbers long.
   3. Loop through the array and sum all the elements into a total field.
   4. Create an HTML element in the page that will hold your output.
   5. Display the array and the sum.
   6. Your output should look like the following sample output.

- Sample Part 1 Output:

    Array: [12, 67, 90, 34, 32, 67, 29, 74, 49, 22]
    Sum:  476

### Your Part 1 Output:

## Part 2

1. Locate the function named "assignment62_1Part2()".
2. Add code after the line: `// PART 2: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise.
3. Part 2 Steps
   1. Write an application that uses this array of numbers
   2. The application will split the array into two new arrays. One of the new arrays will contain all number less than or equal to 75. The other will contain all the numbers greater than 75.
   3. Output the new arrays as shown in the sample output.

- Sample Part 2 Output:

    Array <= 75: [56, 50, 54, ...]
    Array  > 75: [76, 99, 78, ...]

### Your Part 2 Output:

### Submitting your work

- Zip and submit 6.2 Assignment 1.
- Don't forget to also zip and submit your JavaScript file 6.2assignment1.js.
- Make sure that both files are zipped and submitted together.