From e8c149913c6f76c26bd5c39f0ef177f76258cc37 Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 01:18:56 +0200 Subject: [PATCH 1/7] Update arrays.js up to Marcianos feedback. I used .push for adding --- Week1/arrays.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Week1/arrays.js b/Week1/arrays.js index 1e986ad1a..4a44ae919 100644 --- a/Week1/arrays.js +++ b/Week1/arrays.js @@ -1,8 +1,8 @@ //append arrays let arraysInside = []; -console.log ('my array will contain: eagle, horse and dog'); +console.log ('my array will contain some animals'); console.log(arraysInside); let myFavoriteAnimals = ['eagle ', 'dog ', 'horse ']; console.log(myFavoriteAnimals); -arraysInside = ['baby pig ' , myFavoriteAnimals]; +arraysInside.push('baby pig'); console.log(arraysInside); From 7955dcf8f451148be01f2dd020e655d0a1ee0551 Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 01:19:48 +0200 Subject: [PATCH 2/7] Update checkType.js compared all variables at all angles --- Week1/checkType.js | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/Week1/checkType.js b/Week1/checkType.js index e48f81b1c..ba723023c 100644 --- a/Week1/checkType.js +++ b/Week1/checkType.js @@ -23,26 +23,63 @@ if(typeof myName === typeof myAge){ console.log('NOT SAME TYPE') } +if(typeof myName === typeof myHobbies){ + console.log('SAME TYPE') +} else{ + console.log('NOT SAME TYPE') +} + +if(typeof myName === typeof iAmFunny){ + console.log('SAME TYPE') +} else{ + console.log('NOT SAME TYPE') +} + +if(typeof myName === typeof myAge){ + console.log('SAME TYPE') +} else{ + console.log('NOT SAME TYPE') +} + +if(typeof myName === typeof amIFunny){ + console.log('SAME TYPE') +} else{ + console.log('NOT SAME TYPE') +} + if(typeof myAge === typeof myHobbies){ console.log('SAME TYPE') } else{ console.log('NOT SAME TYPE') } +if(typeof myAge === typeof iAmFunny){ + console.log('SAME TYPE') +} else{ + console.log('NOT SAME TYPE') +} + +if(typeof myAge === typeof amIFunny){ + console.log('SAME TYPE') +} else{ + console.log('NOT SAME TYPE') +} + if(typeof myHobbies === typeof iAmFunny){ console.log('SAME TYPE') } else{ console.log('NOT SAME TYPE') } -if(typeof iAmFunny === typeof amIFunny){ +if(typeof myHobbies === typeof amIFunny){ console.log('SAME TYPE') } else{ console.log('NOT SAME TYPE') } -if(typeof amIFunny === typeof myName){ +if(typeof iAmFunny === typeof amIFunny){ console.log('SAME TYPE') } else{ console.log('NOT SAME TYPE') -} \ No newline at end of file +} + From ef957105a00a66065637084726d4a41bc34608ee Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 01:20:54 +0200 Subject: [PATCH 3/7] Update compairingInfinities.js I took infinitives into Variables , than compared to make it more readable . --- Week1/compairingInfinities.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Week1/compairingInfinities.js b/Week1/compairingInfinities.js index 9f837adad..34d90f66d 100644 --- a/Week1/compairingInfinities.js +++ b/Week1/compairingInfinities.js @@ -1,13 +1,19 @@ // store diffrent types of data in one array, and compare the infinitives -let allTypesInsideArray = ['abdullah ', 33 , true] +let allTypesInsideArray = ['abdullah ', 33 , true]; console.log(allTypesInsideArray); console.log('2 examples for compairing infinities') -if(6/0 === 10/0){ +let infinitive1 = 6/0; +let infinitive2 = 10/0; +if(infinitive1 === infinitive2){ console.log(true); } else{ console.log(false); } -console.log(6/0 == 10/0); \ No newline at end of file +console.log(infinitive1 == infinitive2); + +/*in exercise of infinitives i used == and === both +because in this case i wanted to see each option. +i guess types are same but i just anted to see */ From 374834a44481fad5aa6bb35322e73b10c9ccd356 Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 01:21:29 +0200 Subject: [PATCH 4/7] Update helloInDifLang.js console.log for each language --- Week1/helloInDifLang.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Week1/helloInDifLang.js b/Week1/helloInDifLang.js index 0fd6845fb..791046e23 100644 --- a/Week1/helloInDifLang.js +++ b/Week1/helloInDifLang.js @@ -1 +1,3 @@ -console.log ('hello world ' + '\nздравствуйте мира ' + '\nmerhaba dunya'); \ No newline at end of file +console.log ('hello world'); //english +console.log ('здравствуйте мира'); //russian +console.log('merhaba dunya'); //turkish From 5ee2deb1c86fe6b82beba0913b26b5b138cc9ca1 Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 01:22:39 +0200 Subject: [PATCH 5/7] Update numberRounding.js changed calculating to Math.max to find highest. --- Week1/numberRounding.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Week1/numberRounding.js b/Week1/numberRounding.js index 64ff9b078..a32c6fdb1 100644 --- a/Week1/numberRounding.js +++ b/Week1/numberRounding.js @@ -4,7 +4,12 @@ console.log(z); let a = Math.round(z); console.log(a); let numbers = [a, z]; -numbers.sort(function(a, b) { return b - a; }); +let highNumber=(Math.max(z,a)); +console.log(highNumber); + +/* ----this is what i found first--- +numbers.sort(function(a, b) { return b - a; }); var highest = numbers[0]; -console.log(highest); +console.log(highest); +*/ From 92112f6b7a47c2f776c94d8b942fb13e475b3e71 Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 01:23:09 +0200 Subject: [PATCH 6/7] Update varXInteger.js --- Week1/varXInteger.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Week1/varXInteger.js b/Week1/varXInteger.js index dfb847fb6..cbc72f7c5 100644 --- a/Week1/varXInteger.js +++ b/Week1/varXInteger.js @@ -1,7 +1,7 @@ //giving an integer value to variable x let x; -console.log("the value of my variable x will be: my favorite number"); +console.log("the value of my variable x will be: 775"); console.log(x); x = 775; -console.log("the value of x will be my favorite number: 775"); -console.log(x); \ No newline at end of file +console.log("the value of x will be: 775"); +console.log(x); From 2e3f3c194f944495e4f508eb7d2d754445450ff1 Mon Sep 17 00:00:00 2001 From: abdullah <45887687+heartwhite@users.noreply.github.com> Date: Thu, 2 May 2019 16:12:43 +0200 Subject: [PATCH 7/7] Update arrays.js .push chanced to myFavoriteAnimals variable --- Week1/arrays.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Week1/arrays.js b/Week1/arrays.js index 4a44ae919..124d0780e 100644 --- a/Week1/arrays.js +++ b/Week1/arrays.js @@ -4,5 +4,5 @@ console.log ('my array will contain some animals'); console.log(arraysInside); let myFavoriteAnimals = ['eagle ', 'dog ', 'horse ']; console.log(myFavoriteAnimals); -arraysInside.push('baby pig'); -console.log(arraysInside); +myFavoriteAnimals.push('baby pig'); +console.log(myFavoriteAnimals);