-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.js
More file actions
38 lines (32 loc) · 977 Bytes
/
variables.js
File metadata and controls
38 lines (32 loc) · 977 Bytes
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
//////////////////PROBLEM 1////////////////////
/* Create a variable called 'myName' with a value that is your name as a string. */
//CODE HERE
let myName = 'nadiamond'
//////////////////PROBLEM 2////////////////////
/* Create a variable called 'faveNum' with a value that is your favorite number. */
//CODE HERE
let faveNum = 21
//////////////////PROBLEM 3////////////////////
/* Create a variable called 'lovesCode' and assign it a boolean value. */
//CODE HERE
let lovesCode= true
//////////////////PROBLEM 4////////////////////
/*
Write an if-statement that checks if the faveNum variable is
equal to 13. If it is, console.log('lucky 13!').
If it's not, console.log('not lucky 13').
*/
//CODE HERE
if (faveNum===13){
console.log('lucky 13!')
} else {
console.log('not lucky 13.')
}
//////////////////PROBLEM 5////////////////////
/*
Write a for loop that prints out your faveNum 5 times.
*/
//CODE HERE
for (let i=0;i<5;i++) {
console.log(faveNum);
}