forked from truecodersio/JavaScript_Operators
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
86 lines (63 loc) · 1.9 KB
/
app.js
File metadata and controls
86 lines (63 loc) · 1.9 KB
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
console.log("Hello World!\n==========\n");
console.log(
"Follow the steps in the README.md file to complete the exercises:\n==========\n"
);
// Exercise 1
console.log("EXERCISE 1:\n==========\n");
let a =20;
let b = 4;
let add = a+b;
console.log(`add: ${add}`)
let minus = a-b;
console.log(`minus: ${minus}`)
let multiply = a*b;
console.log(`multiply: ${multiply}`)
let dividing = a/b;
console.log(`dividing: ${dividing}`)
// YOUR CODE HERE
// Exercise 2
console.log("EXERCISE 2:\n==========\n");
a = 11;
let str = "11";
let str2 = "eleven";
let isPresent = true;
let firstName = "Jackie";
let lastName = "Chan";
console.log(`- What is the value of: a + str?`)
console.log(a+str)
console.log(`- What is the value of: a + str2?`)
console.log(a+str2)
console.log(`- What is the value of: a + isPresent?`)
console.log(a+isPresent)
console.log(`- What is the value of: a + firstName?`)
console.log(a+firstName)
console.log(`- What is the value of: a + lastName?`)
console.log(a+lastName)
// YOUR CODE HERE
// Exercise 3
console.log("EXERCISE 3:\n==========\n");
a = 5;
str = "5";
str2 = "five";
isPresent = false;
firstName = "Robin";
lastName = "Williams";
console.log(`- What is the value of: a == str?`)
console.log(a == str)
console.log(`- What is the value of: a === str?`)
console.log(a === str)
console.log(`- What is the value of: !isPresent?`)
console.log(!isPresent)
console.log(`- What is the value of: (“eleven” == str2 && a >= str)?`)
console.log(('eleven' == str2 && a >= str))
console.log(`- What is the value of: (!isPresent || isPresent)?`)
console.log((!isPresent || isPresent))
console.log(`- What is the value of: 0 == false?`)
console.log( 0 == false)
console.log(`- What is the value of: 0 === false?`)
console.log(0 === false)
console.log(`- What is the value of: 0 != false?`)
console.log(0 != false)
console.log(`- What is the value of 0 !== false?`)
console.log(0 !== false)
// YOUR CODE HERE