---
# System prepended metadata

title: 'Unit 1: Lesson 5 - Coding Lab (Data Manipulation)'
tags: ['''23-''24']

---

# Unit 1: Lesson 5 - Coding Lab (Data Manipulation)

## Objective:
The objective of this lab is to practice working with variables, including declaration, assignment, and reassignment, and to explore basic data manipulation with numbers and strings in JavaScript.

## Instructions

### Part 1: Variable Declaration and Assignment [1.1: 1 pt]

1. Declare a variable called `studentName` and assign it your name as a string.
2. Declare a variable called `age` and assign it your age as a number.
3. Declare a variable called `course` and assign it the string "Computer Science Principles."

### Part 2: Variable Reassignment [1.1: 1 pt]

1. Reassign the `studentName` variable to the name of a famous person.
2. Reassign the `age` variable to a different age.
3. Reassign the `course` variable to "Advanced Computer Science."

### Part 3: Data Manipulation with Numbers [1.4: 1 pt]

1. Declare a variable called `num1` and assign it a number (e.g., 10).
2. Declare a variable called `num2` and assign it another number (e.g., 5).
3. Create a new variable called `sum` and calculate the sum of `num1` and `num2`. Print the result to the console.
4. Create a new variable called `difference` and calculate the difference between `num1` and `num2`. Print the result to the console.
5. Create a new variable called `product` and calculate the product of `num1` and `num2`. Print the result to the console.
6. Create a new variable called `quotient` and calculate the quotient of `num1` divided by `num2`. Print the result to the console.

#### Part 4: Data Manipulation with Strings [1.4: 1 pt]

1. Declare a variable called `sumMessage` and use string interpolation to assign it the string `sum result: ${sum}`.
    1a. Use `console.log`, the `sumMessage` variable, and a string method to output the variable in uppercase
    
2. Declare a variable called `differenceMessage` and use string interpolation to assign it the string `difference result ${difference}`.
    2a. Use `console.log`, the `differenceMessage` variable, and a string method to output the variable in uppercase
    
3. Declare a variable called `productMessage` and use string interpolation to assign it the string `product result ${product}`.
    3a. Use `console.log`, the `productMessage` variable, and a string method to output the variable in uppercase
    
4. Declare a variable called `quotientMessage` and assign it the string `quotient result ${quotient}`.
    4a. Use `console.log`, the `quotientMessage` variable, and a string method to output the variable in uppercase.