Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 77a90d5

Browse files
committed
reforked my repo to the right repo
1 parent c277dc7 commit 77a90d5

22 files changed

Lines changed: 357 additions & 0 deletions

‎Week1/Homework/ex_1.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//Exercise 1: Hello world!//
2+
console.log('Hello World'); //English
3+
console.log('Ciao Mondo'); //Italian
4+
console.log('Hola Mundo'); //Spanish
5+
console.log('Hallo Werld'); //Dutch
6+
console.log('Bonjour Le Monde'); //French
7+
console.log('Përshendetje Botë'); //Albanian
8+
console.log('Hej Verden'); //Danish
9+
console.log('Hallo Weit'); //German
10+
console.log('Dia Duit Domhan'); //Irish
11+
console.log('Salve Mundi'); //Latin

‎Week1/Homework/ex_10.js‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//Exercise 10: Compare arrays
2+
let arr1 = ['Hello', 123, true, { name: 'Saif' }];
3+
let arr2 = [87, false, 'Alamrani', undefined, null, { name: 'Vahid' }, 'love'];
4+
console.log(arr1.length);
5+
console.log(arr2.length);
6+
7+
if (arr1.length === arr2.length) {
8+
console.log('They are the same!');
9+
} else {
10+
console.log('Two different sizes');
11+
}

‎Week1/Homework/ex_2.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//Exercise 2: Error debugging//
2+
console.log("I'm awesome");

‎Week1/Homework/ex_3.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//Exercise 3: Log the number//
2+
let numberX;
3+
console.log('the value of X is undefined');
4+
console.log(numberX);
5+
numberX = 87;
6+
console.log('the value of numberX is 87');
7+
console.log(numberX);

‎Week1/Homework/ex_4.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//Exercise 4: Log the string//
2+
3+
let myString = 'Saif Alamrani';
4+
console.log('the value of the string is my full name');
5+
console.log(myString);
6+
myString = 'Vahid Hoti';
7+
console.log('the value of the string is my Boyfriend full name');
8+
console.log(myString);

‎Week1/Homework/ex_5.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//Exercise 5: Round a number and log it
2+
let z = 7.25;
3+
console.log(z);
4+
let a = Math.round(z);
5+
console.log(a);
6+
let max = Math.max(z, a);
7+
console.log(max);

‎Week1/Homework/ex_6.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//Exercise 6: Log an array of animals//
2+
let items = [];
3+
console.log('the value of the array is am empty array');
4+
console.log(items);
5+
let myFavAnimals = ['Pandas', 'Dogs', 'Cats'];
6+
console.log(myFavAnimals);
7+
myFavAnimals.push('Piglet');
8+
console.log(myFavAnimals);

‎Week1/Homework/ex_7.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//Exercise 7: Log the length of a string//
2+
let mySentence = 'Programming is so interesting!';
3+
console.log(mySentence.length);

‎Week1/Homework/ex_8.js‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//Exercise 8: Type checker//
2+
let x = 'Saif Alamrani';
3+
let y = 'Vahid Hoti';
4+
let p1 = { Name: 'Saif', Age: 32, Gender: 'male' };
5+
let p2 = { Name: 'Vahid', Age: 35, Gender: 'male' };
6+
7+
console.log(x);
8+
console.log(y);
9+
console.log(p1);
10+
console.log(p2);
11+
12+
if (typeof x === typeof y) {
13+
console.log('same type');
14+
} else {
15+
console.log('not the same type');
16+
}
17+
if (typeof x === typeof p1) {
18+
console.log('same type');
19+
} else {
20+
console.log('not the same type');
21+
}
22+
if (typeof y === typeof x) {
23+
console.log('same type');
24+
} else {
25+
console.log('not the same type');
26+
}
27+
if (typeof y === typeof p2) {
28+
console.log('same type');
29+
} else {
30+
console.log('not the same type');
31+
}

‎Week1/Homework/ex_9.js‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//Exercise 9: Log the remainder//
2+
1.
3+
let valueX = 7;
4+
let valueY = 3;
5+
let valueZ = valueX % valueY;
6+
console.log(valueZ);
7+
the value of x = 1;
8+
9+
// //2.
10+
let valueX = 4;
11+
let valueY = 21;
12+
valueY = valueY % valueX;
13+
console.log(valueY);
14+
15+
let valueZ = 13;
16+
let valueY = 2;
17+
valueZ = valueZ % valueY;
18+
console.log(valueM);

0 commit comments

Comments
 (0)