-
Notifications
You must be signed in to change notification settings - Fork 218
Expand file tree
/
Copy pathapp.js
More file actions
65 lines (50 loc) · 1.81 KB
/
app.js
File metadata and controls
65 lines (50 loc) · 1.81 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
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");
// YOUR CODE HERE
var a;
var b;
a=20;
b=4;
var add = a+b;
var minus= a-b;
var multipy=a*b;
var dividing=a/b;
console.log(add);
console.log(minus);
console.log(multipy);
console.log(dividing);
// Exercise 2
console.log("EXERCISE 2:\n==========\n");
// YOUR CODE HERE
let num =11;
let str ="11";
let str2 ="eleven";
let isPresent =true;
let firstName = "Fardo";
let lastName = "Baggins";
console.log( "What is the value of: num + str?",num+str);
console.log(" What is the value of: num + str2?" ,num+str2);
console.log( "What is the value of: num + isPresent? " ,num+isPresent);
console.log("What is the value of: firstName + num? " , firstName+num);
console.log(" What is the value of: isPresent + str?" , isPresent+str);
console.log( " What is the value of: firstName + lastName?" ,firstName+lastName);
// Exercise 3
console.log("EXERCISE 3:\n==========\n");
// YOUR CODE HERE
let val = 5;
let str3 = "5";
let str4 = "five";
let isPresent2 = false;
// console.log("What is the value of: val == str3 ? ", val == str3);
// console.log(" What is the value of: !isPresent2 ?", !isPresent2 );
// console.log("What is the value of: (“str2” == str4 && val >= str3)?", “str2” == str4 && val >= str3);
// console.log("What is the value of: (!isPresent2 || isPresent)? ", !isPresent2 || isPresent );
// console.log(" What is the value of: 0 == false?", 0 == false );
// console.log("What is the value of: 0 === false? ", 0 === false );
// console.log(" What is the value of: 0 != false?", != false);
// console.log("What is the value of 0 !== false? ", !== false);
// console.log("What is the value of: val === str3? ", val === str3 );