Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc297b4

Browse files
authored
Update app.js
I have split the questions and corrected some mistakes that figured out by Marciano.
1 parent ea60574 commit cc297b4

File tree

1 file changed

+76
-14
lines changed

1 file changed

+76
-14
lines changed

app.js

Lines changed: 76 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,142 @@
1+
//1.
12
let englishGreeting = "Hello, World!"
23
console.log(englishGreeting);
34
let kurdishGreeting = "Silav, Cihan!"
45
console.log(kurdishGreeting);
56
let dutchGreeting = "Hoi, Wereld!"
67
console.log(dutchGreeting);
78

9+
//2.
810
let me = "I'm awesome!"
911
console.log(me);
1012

13+
//3.1
1114
let x;
12-
console.log("I think the value of x is a number");
13-
console.log("The value of x is 6");
15+
16+
//3.2
17+
console.log("I think the value of x will be: undefined");
18+
19+
//3.3
20+
console.log(x);
21+
22+
//3.4
1423
let x = 6;
15-
console.log("I think the value of x is 6");
24+
25+
//3.5
26+
console.log("the value of x is: 6");
27+
28+
//3.6
1629
console.log(x);
1730

31+
//4.1
1832
let y ="Sivan";
33+
34+
//4.2
1935
console.log("I think the value of y is a name");
36+
37+
//4.3
2038
console.log(y);
39+
40+
//4.4
2141
const y = "Hassam";
22-
console.log("There will be an error because now I have
23-
the same variable with different values.");
42+
43+
//4.5
44+
console.log("There will be an error because now I have the same variable with different values.");
45+
46+
//4.6
2447
console.log(y);
2548

49+
//5.
2650
const z = 7.25;
51+
52+
//5.1
2753
console.log(z);
54+
55+
//5.2
2856
const a = z;
57+
58+
//5.3
2959
console.log(a);
60+
61+
//5.4
3062
var round =Math.round(7.25);
63+
64+
//5.6
3165
console.log(round)
3266

33-
let arrays =
34-
console.log("I think variable arrays is related to animals");
67+
//6.1
68+
let arrays;
69+
70+
//6.2
71+
console.log("I think the value will be undefined");
72+
73+
//6.3
3574
console.log(arrays);
75+
76+
//6.4
3677
let myFavoriteAnimals = [cat, dog, sheep];
78+
79+
//6.5
3780
console.log(myFavoriteAnimals);
81+
82+
//6.6
3883
let favoriteAnimalOfDaan = "baby pig";
39-
const animals = "myFavoriteAnimals" + "" + "favoriteAnimalOfDaan";
84+
const animals = myFavoriteAnimals + "" + favoriteAnimalOfDaan;
85+
86+
//6.7
4087
console.log(animals);
4188

89+
//7.1
4290
let myString = "this is a test";
91+
92+
//7.2
4393
console.log(myString);
44-
console.log(myString ["length"]);
4594

95+
//7.3
96+
console.log(myString.length);
97+
98+
//8.1
4699
let num = 11;
47100
let address = "Huygenhoekring";
48101
let supermarkets = ["Lidl", "Dekka", "Jumbo"];
49102
let booleans = true, false, true;
103+
104+
//8.2
50105
console.log(num);
51106
console.log(address);
52107
console.log(supermarkets);
53108
console.log(booleans);
54-
console.log(I think the type of num is number,
55-
type of address is string,
56-
type of supermarkets is array and
57-
type of booleans is boolean.);
109+
110+
//8.3
111+
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.");
112+
113+
//8.4
58114
console.log(typeof num);
59115
console.log(typeof supermarkets);
60116
console.log(typeof booleans);
61117
console.log(typeof address);
62118

119+
//8.5
63120
if (num != address) {
64121
console.log("num is a number and address is a string");
65122
}
66123

124+
//9.1
67125
let s = 7;
68126
let v = 3;
69127
let h = s % 3;
70128
console.log(s % h);
71129
console.log(s % v);
72130
console.log(v % h);
73131

132+
//10.1
74133
const mix = [5, "Shvan"];
75134
console.log(mix);
76135

136+
//10.2
77137
var maxNumber = Math.pow(6/0);
78138

79-
if (maxNumber === Infinity)
139+
//10.2
140+
if (maxNumber === Infinity){
80141
console.log(0 / maxNumber);
142+
}

0 commit comments

Comments
 (0)