forked from HackYourFuture/JavaScript1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
141 lines (103 loc) · 2.19 KB
/
Copy pathapp.js
File metadata and controls
141 lines (103 loc) · 2.19 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
//1.
let englishGreeting = "Hello, World!"
console.log(englishGreeting);
let kurdishGreeting = "Silav, Cihan!"
console.log(kurdishGreeting);
let dutchGreeting = "Hoi, Wereld!"
console.log(dutchGreeting);
//2.
let me = "I'm awesome!"
console.log(me);
//3.1
let x;
//3.2
console.log("I think the value of x will be: undefined");
//3.3
console.log(x);
//3.4
let x = 6;
//3.5
console.log("the value of x is: 6");
//3.6
console.log(x);
//4.1
let y ="Sivan";
//4.2
console.log("I think the value of y is a name");
//4.3
console.log(y);
//4.4
const y = "Hassam";
//4.5
console.log("There will be an error because now I have the same variable with different values.");
//4.6
console.log(y);
//5.
const z = 7.25;
//5.1
console.log(z);
//5.2
const a = z;
//5.3
console.log(a);
//5.4
var round =Math.round(7.25);
//5.6
console.log(round)
//6.1
let arrays;
//6.2
console.log("I think the value will be undefined");
//6.3
console.log(arrays);
//6.4
let myFavoriteAnimals = ['cat', 'dog', 'sheep'];
//6.5
console.log(myFavoriteAnimals);
//6.6
const animals = myFavoriteAnimals.push('baby pig');
//6.7
console.log(animals);
//7.1
let myString = "this is a test";
//7.2
console.log(myString);
//7.3
console.log(myString.length);
//8.1
let num = 11;
let address = "Huygenhoekring";
let supermarkets = ["Lidl", "Dekka", "Jumbo"];
let booleans = true, false, true;
//8.2
console.log(num);
console.log(address);
console.log(supermarkets);
console.log(booleans);
//8.3
console.log("I think the type of num is number, type of address is string, type of supermarkets is array and type of booleans is boolean.");
//8.4
console.log(typeof num);
console.log(typeof supermarkets);
console.log(typeof booleans);
console.log(typeof address);
//8.5
if (num != address) {
console.log("num is a number and address is a string");
}
//9.1
let s = 7;
let v = 3;
let h = s % 3;
console.log(s % h);
console.log(s % v);
console.log(v % h);
//10.1
const mix = [5, "Shvan"];
console.log(mix);
//10.2
var maxNumber = Math.pow(6/0);
//10.2
if (maxNumber === Infinity){
console.log(0 / maxNumber);
}