This repository was archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 255
Amna J.s week1 #212
Closed
Closed
Amna J.s week1 #212
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| 'use strict'; | ||
| console.log("I'm awesome") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| 'use strict'; | ||
| let myString = 'Amna Ahmad'; //1 | ||
| console.log('the value is the string above'); //2 | ||
| console.log(myString); //3 | ||
| myString = 'a new string'; //4 | ||
| console.log('the new string'); //5 | ||
| console.log(myString); | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| 'use strict'; | ||
| const z = 7.25; | ||
| console.log(z); | ||
| const a = 7; | ||
| console.log(a); | ||
| const biggistNumber = a > z ? a : z; | ||
AmnaAhmad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| console.log(biggistNumber); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 'use strict'; | ||
| const firstArray = ["good", 26, true, {name: "Amna"}]; | ||
| const secondArray = ["beter", 38, false, "why?", "Who", "what", {frinds: "Hala"}]; | ||
|
|
||
| console.log('The length of the first array is ...' + firstArray.length); | ||
| console.log('The length of the second array is ...' + secondArray.length); | ||
|
|
||
| if(firstArray.length == secondArray.length){ | ||
| console.log("They are the same!") | ||
| }else{ | ||
| console.log("Two different sizes"); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| 'use strict'; | ||
|
|
||
| let numberX; // 1 | ||
| console.log('undefined, because the variable is not assigned a value'); //2 | ||
| console.log(numberX); //3 | ||
| numberX = 10; //4 | ||
| console.log('10, because now it has been assigned a value 10'); //5 | ||
| console.log(numberX); //6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| 'use strict'; | ||
| const paragraphs = []; //1 | ||
| console.log('I have to show an empty arrey'); //2 | ||
| console.log(paragraphs); //3 | ||
|
|
||
| const favoriteAnimals = ['fish ', 'butterfly ', ' rabbit ' ]; //4 | ||
| console.log(favoriteAnimals); //5 | ||
| favoriteAnimals.push('Piglet'); | ||
| console.log(favoriteAnimals); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| 'use strict'; | ||
| const mySentence = "Programming is so interesting!"; | ||
| console.log(mySentence.length); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| 'use strict'; | ||
| const name = 'Amna'; //string | ||
AmnaAhmad marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| const lastName = 'Ahmad';//string | ||
|
|
||
| const firstObject = { | ||
| fatherName : 'Musleh', | ||
| motherName: 'Fatima', | ||
| brotherName:'Sagvan' | ||
| }//object | ||
| const secondObject = { | ||
| bigSister : 'Torfa', | ||
| secondSister: 'Nesrin', | ||
| therdSister:'Janda' | ||
| }//object | ||
|
|
||
| console.log(name); | ||
| console.log(lastName); | ||
| console.log(firstObject); | ||
| console.log(secondObject); | ||
|
|
||
|
|
||
| //first conditional | ||
|
|
||
| if(typeof name == typeof lastName) { | ||
| console.log('the both of name and lastName are string'); | ||
| } else{ | ||
| console.log('the both of name and lastName are not string'); | ||
| } | ||
| //socond conditional | ||
|
|
||
| if(typeof firstObject == typeof secondObject) { | ||
| console.log('the both of firstObject and secondObject are string'); | ||
| } else{ | ||
| console.log('the both of firstObject and secondObject are object'); | ||
| } | ||
| //therd conditional | ||
| if(typeof name == typeof secondObject) { | ||
| console.log('the both of name and secondObject are string'); | ||
| } else{ | ||
| console.log('the name is string and secondObject is object'); | ||
| } | ||
|
|
||
|
|
||
| //fourth conditional | ||
| if(typeof lastName == typeof firstObject) { | ||
| console.log('all of this are not different'); | ||
| } else{ | ||
| console.log('lastName is string but first object is an object '); | ||
| } | ||
|
|
||
| //fivth conditional | ||
|
|
||
| if(typeof name == typeof firstObject) { | ||
| console.log('all of this are not different'); | ||
| } else{ | ||
| console.log('name is string but firstObject is an object'); | ||
| } | ||
| //sixth conditional | ||
| if(typeof lastName == typeof secondObject) { | ||
| console.log('all of this are not different'); | ||
| } else{ | ||
| console.log('lastName is string but secondObject is an object'); | ||
| } | ||
|
|
||
|
|
||
| console.log(typeof name); | ||
| console.log(typeof firstObject); | ||
|
|
||
| console.log(typeof name, typeof firstObject); | ||
AmnaAhmad marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| 'use strict'; | ||
| let x = 7; | ||
| x = x % 3; | ||
| console.log(x); | ||
| /*the answer is 1 . the solution is | ||
| 7 / 3 = 2 ; | ||
| 2 * 3 = 6 ; | ||
| 7 - 6 = 1; | ||
| */ | ||
|
|
||
| let y =21; | ||
| y = y %4; | ||
| console.log(y); | ||
| /*the answer is 1 . the solution is | ||
| 21 / 4 = 5 ; | ||
| 5 * 4 = 20 ; | ||
| 21 - 20 = 1; | ||
| */ | ||
|
|
||
| let z = 13; | ||
| z = z % 2 ; | ||
| console.log(y); | ||
| /*the answer is 1 . the solution is | ||
| 13 / 2 = 6 ; | ||
| 6 * 2 = 12 ; | ||
| 13 - 12 = 1; | ||
| */ | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| 'use strict'; | ||
| console.log('Hello ' + 'World'); // English | ||
| console.log('Halo ' + 'Mundo'); //Spanish | ||
| console.log('こんにちは ' + '世界'); //日本人 | ||
| console.log('Bongu ' + 'Tad-dinja'); // Maltese | ||
| console.log('שלום ' + 'עולם'); // Hebrew | ||
| console.log('مرحبا ' + 'العالمية'); // Arabic | ||
| console.log('Hej ' + 'Verden'); // Danish | ||
| console.log('алло ' + 'Мир'); // Russian | ||
| console.log('هالو ' + 'ودرلد'); // Persian | ||
| console.log('slav ' + 'Dinya'); // Kurdish |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.