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 1 commit
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
Prev Previous commit
fixed 1
  • Loading branch information
EnwerMemet committed Dec 1, 2019
commit 5977a632232b9957b0419a908a353b714c81783e
4 changes: 2 additions & 2 deletions Week1/homework/js-exercises/LogString.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let myString="Enwer Memet";
let myString = "Enwer Memet";
console.log(`my fullname`);
console.log(myString);

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

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


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



// let a=7;
// let z=7.25;
// console.log(a===z);



// let result = a>z;
// alert (result);


// // alert(a>z);
// // alert(a<z);
// // alert(a=z);
4 changes: 2 additions & 2 deletions Week1/homework/js-exercises/arrayOfAnimals.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var animals=[];
let animals=[];
console.log(`an empty array`);
console.log(animals);

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


Expand Down
1 change: 1 addition & 0 deletions Week1/homework/js-exercises/compareArray.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ if (names.length === numbers.length) {
} else {
console.log('Two different sizes');
}

4 changes: 1 addition & 3 deletions Week1/homework/js-exercises/errorDebugging.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// console.log('I'm awesome');
// 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`);
4 changes: 2 additions & 2 deletions Week1/homework/js-exercises/lengthString.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'
var mySentence ="Programming is so interesting!";
var length=mySentence.length;
let mySentence ="Programming is so interesting!";
let length=mySentence.length;
console.log(length);

// or
Expand Down
30 changes: 10 additions & 20 deletions Week1/homework/js-exercises/logHello.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
'use strict'
let a = 'Hello'+ " " +'world!';//english
console.log(a);
let b = 'Selam ' + " " +'Dünya';//turkish
console.log(b);
let c = 'salve ' + " " +'mundi!';//
console.log(c);
let a = 'こんにちは' + " " +'世界!';//japanese
console.log(a);
let d = '안녕 ' + " " +'세상!';//korean
console.log(d);
let e = 'Hallo'+ " " +'wereld!';//dutch
console.log(e);
let f = 'مرحبا'+ " " +'عالم!';//arabic
console.log(f);
let g = 'سلام' + " " +'دنیا!';//iran
console.log(g);
let h = 'سالام'+ " " +'دۇنيا!';//uyghur
console.log(h);
let i = 'ciao'+ " " +'mondo!';
console.log(i);
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



Expand Down
3 changes: 1 addition & 2 deletions Week1/homework/js-exercises/lognumber.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
'use strict';
let x;
console.log('I think the value of x is undifined ');
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);
8 changes: 4 additions & 4 deletions Week1/homework/js-exercises/remainder.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ x %= 3;// 7-3-3=1
console.log(x);


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


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

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

Expand Down Expand Up @@ -49,4 +49,5 @@ if (typeof car === typeof team) {
}
else {
console.log('car and team: Not the same...')
}
}