Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Week1/homework/js-exercises/LogString.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let myString = "Enwer Memet";
console.log(`my fullname`);
console.log(myString);

myString = "love you";
console.log('love');
console.log(myString);
10 changes: 10 additions & 0 deletions Week1/homework/js-exercises/RoundNumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let z = 7.25;
console.log(z);

let a = (Math.round(z));
console.log(a);


const highestValue = (Math.max(a,z));
console.log(highestValue);

11 changes: 11 additions & 0 deletions Week1/homework/js-exercises/arrayOfAnimals.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
let animals=[];
console.log(`an empty array`);
console.log(animals);

let myPets = ["cat", "horse", "sheep"];
console.log(myPets);


myPets.push('Piglet');
console.log(myPets);

19 changes: 19 additions & 0 deletions Week1/homework/js-exercises/compareArray.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict'
let names=['Nur','gul','tur','yuri'];
let numbers=[1,2,3,4,5,6,7];

console.log('The length of the array is ' + names.length);
// console.log(names.length);
console.log('The length of the array is ' + numbers.length);
// console.log(numbers.length);

let compare = names.length === numbers.length;
console.log(compare);


if (names.length === numbers.length) {
console.log('They are the same!');
} else {
console.log('Two different sizes');
}

6 changes: 6 additions & 0 deletions Week1/homework/js-exercises/errorDebugging.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// console.log('I'm awesome'); //find error
// changes single queto to double queto
console.log("I'm awesome");
// or
console.log('I\'m awesome');
console.log(`I'm awesome`);
22 changes: 22 additions & 0 deletions Week1/homework/js-exercises/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>js-exersize</title>
</head>
<body>
<h1>salam</h1>





</body>




<script src="compareArray.js"></script>
</html>
8 changes: 8 additions & 0 deletions Week1/homework/js-exercises/lengthString.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict'
let mySentence ="Programming is so interesting!";
let length=mySentence.length;
console.log(length);

// or
// console.log(mySentence.length);
// document.write(mySentence.length);
16 changes: 16 additions & 0 deletions Week1/homework/js-exercises/logHello.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict'
console.log('Hello' + " " + 'world!'); //english
console.log('Selam ' + " " + 'Dünya'); //turkish
console.log('salve ' + " " + 'mundi!'); //xxx
console.log('こんにちは' + " " + '世界!'); //japanese
console.log('안녕 ' + " " + '세상!'); //korean
console.log('Hallo' + " " + 'wereld!'); //dutch
console.log('مرحبا' + " " + 'عالم!'); //arabic
console.log('سلام' + " " + 'دنیا!'); //iranian
console.log('سالام' + " " + 'دۇنيا!'); //uyghur
console.log('ciao' + " " + 'mondo!'); //xgy





8 changes: 8 additions & 0 deletions Week1/homework/js-exercises/lognumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';
let x;
console.log('I think the value of x is undifined');
console.log(x);

x = 12;
console.log(`i think it's an integer, its value is 12`);
console.log(x);
20 changes: 20 additions & 0 deletions Week1/homework/js-exercises/remainder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use strict'
let x = 7;
x = x % 3;
x %= 3;// 7-3-3=1
console.log(x);


let y = 21;
y = y % 4;
y %= 4;// 21-4-4-4-4-4=1;
console.log(y);


let z = 13;
z = z % 2;
z %= 2;// 13-2-2-2-2-2-2=1
console.log(z);



53 changes: 53 additions & 0 deletions Week1/homework/js-exercises/typeChecker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict'
let fruit = 'apple';
let user = 'enwer';
const car = { type: "Fiat", model: "500", color: "white" };
const team = { type: "lakers", model: "1990", color: "yellow" };

if (typeof fruit === typeof user) {
console.log('fruit and user : SAME TYPE')
}
else {
console.log('fruit and user: Not the same...')
}


if (typeof fruit === typeof car) {
console.log('fruit and car : SAME TYPE')
}
else {
console.log('fruit and car: Not the same...')
}


if (typeof fruit === typeof team) {
console.log('fruit and team : SAME TYPE')
}
else {
console.log('fruit and team: Not the same...')
}


if (typeof fruit === typeof user) {
console.log('fruit and user : SAME TYPE')
}
else {
console.log('fruit and user: Not the same...')
}


if (typeof team === typeof user) {
console.log('team and user : SAME TYPE')
}
else {
console.log('team and user: Not the same...')
}


if (typeof car === typeof team) {
console.log('car and team : SAME TYPE')
}
else {
console.log('car and team: Not the same...')
}

34 changes: 34 additions & 0 deletions Week2/LESSONPLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,40 @@ if (s2 == s1) {
}
```

let statement=[
let s = "Hello".toLowerCase();
let l = s.length;


function sum(a, b) {
return a + b;
}
let max = function (a, b) {
return a > b ? a : b;
}

let s1 = sum(4, 5);
let s2 = 4 + 5;

if (s2 == s1) {
console.log("same");
} else {
console.log("not same");
}
]

let expression =[
"Hello".toLowerCase()

s.length

sum(4, 5)

function (a, b)

return a + b
]

List all 11 *statements* in the code above
List all 28 *expressions* in the code above (BONUS!)

Expand Down
9 changes: 9 additions & 0 deletions Week2/playground.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
let shoes = `green`;
let shirt = `green`;
let pants = `green`;

if (shoes === `green` && shoes === `green` && pants === `green`){
console.log('they are green');
}