forked from CoachJulian/2023TeamEdgeTerm0
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.js
98 lines (59 loc) · 2.62 KB
/
variables.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/* --------------------------------------------
Day 1 Challenges:
-------------------------------------------- */
// Example
let message = "Hello World!";
console.log(message);
/* --------------------------------------------
Challenge 1:
Imagine it's the first day of class. (Wait, it is the first day isn't it..Deja vu?)
Everyone's participating in an icebreaker and has to introduce themselves.
It goes something like:
-------------------------------------------- */
console.log("------------------- Challenge 1 -------------------")
console.log(`Hi! My name is ${name}`);
console.log(`I'm in the ${grade}th grade.`);
console.log(`A fun fact about me is that ${funFact}`);
// **** Challenge 1: Problem 1 ****
// Declare and initalize the variables with your response for the three statements above!
// Hint: Also think about where you would declare and initialize those variables
// **** Upchallenge! ****
// Can you also print out the data type of the variables?
// **** Challenge 1: Problem 2 ****
// Create a string for the different lines of the Happy Birthday Song
// Print out the song using the stings you declared.
// **** Challenge 1: Problem 3 ****
// Print out a string that has backticks in it.
/* --------------------------------------------
Challenge 2:
Below is a set of problems to help you solidify your understanding of math operators
Write your solution code under each commented problem.
-------------------------------------------- */
console.log("------------------- Challenge 2 -------------------")
// Here are some variables to get you started
let num1 = 5;
let num2 = 10;
// **** Challenge 2: Problem 1 ****
// Store the sum of num1 and num2 in a variable.
// Print the sum.
// **** Challenge 2: Problem 2 ****
// Store the difference between sum (above) and 7 in a variable.
// Print the difference.
// **** Challenge 2: Problem 3 ****
// Store the product of the difference and 3 in a variable.
// Print the product.
// **** Challenge 2: Problem 4 ****
// Store the power of the product squared in a variable.
// Print the power.
// **** Challenge 2: Problem 5 ****
// Store the quotient of the power divided by 4 in a variable.
// Print the quotient.
// **** Challenge 2: Problem 6 ****
// Store the remainder of the quotient divided by 2 in a variable.
// Print the remainder.
// **** Upchallenge! ****
// Given a variable that stores a number, print the values that come right before and right after.
// For example, given the number 4, the program should print 3 and 5.
// Your code should work if the value of the variable is changed.
let num = 9;
/* -------------------------------------------- */