This repository was archived by the owner on Jan 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 475
NW5-Leeds-Jihad_Omer-JS -week1 #396
Open
JihadOmer
wants to merge
14
commits into
CodeYourFuture:master
Choose a base branch
from
JihadOmer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5c25dac
B Done !
JihadOmer c2ead68
C done !
JihadOmer 280dc1b
D done
JihadOmer 20862b8
D is done
JihadOmer 107a1d3
F done
JihadOmer 5d3a162
G done !!
JihadOmer 27faa4e
I Done !!
JihadOmer cacb7f0
J Done !!
JihadOmer 5fda809
K Done !!
JihadOmer ef1a1b9
L Done !!
JihadOmer c15c457
syntax-errors Done !
JihadOmer bc6602c
2-logic-error.js Done!!
JihadOmer e7fe6b9
3-function-output.js Done!
JihadOmer 3b1d7b7
4-tax.js Done !
JihadOmer 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| console.log("Hello world"); | ||
| console.log('Hello Jiahd'); |
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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| // Start by creating a variable `greeting` | ||
| var greeting = "Hello world"; | ||
|
|
||
| console.log(greeting); | ||
| console.log(greeting); | ||
| console.log(greeting); |
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 |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| // Start by creating a variable `message` | ||
|
|
||
| console.log(message); | ||
|
|
||
|
|
||
| var message = "This is a string"; | ||
| var messageType = typeof message; | ||
|
|
||
| console.log(messageType); | ||
|
|
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 |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| // Start by creating a variable `message` | ||
|
|
||
| console.log(message); | ||
|
|
||
|
|
||
| var greetingStart = "Hello, my name is "; | ||
| var name = "JIHAD"; | ||
|
|
||
| var greeting = greetingStart + name; | ||
|
|
||
| console.log(greeting); |
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 |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
|
|
||
|
|
||
|
|
||
| // Start by creating a variable `message` | ||
| var name = "Jihad"; | ||
| var nameLength = name.length; | ||
| var message = 'My Name is ' + name + ' and my name is ' + nameLength + ' characters long'; | ||
|
|
||
|
|
||
| console.log(message); | ||
|
|
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 |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| const name = " Daniel "; | ||
|
|
||
| console.log(message); | ||
|
|
||
|
|
||
|
|
||
| var name = "Jihad"; | ||
| var nameLength = name.length; | ||
| var message = 'My Name is ' + name + ' and my name is ' + nameLength + ' characters long'; | ||
|
|
||
|
|
||
| console.log(message.trim()) |
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 |
|---|---|---|
| @@ -1 +1,16 @@ | ||
| // Start by creating a variables `numberOfStudents` and `numberOfMentors` | ||
|
|
||
|
|
||
| var numberOfStudents = 15 | ||
| var numberOfMentors = 8 | ||
| var Total = numberOfStudents + numberOfMentors; | ||
|
|
||
|
|
||
|
|
||
| // Number of students: 15 | ||
| // Number of mentors: 8 | ||
| // Total number of students and mentors: 23 | ||
|
|
||
| console.log('number of studets is : ' + numberOfStudents) | ||
| console.log('number of Mentors is : ' + numberOfMentors) | ||
| console.log('Total number of students and mentors: ' + Total) |
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 |
|---|---|---|
| @@ -1,2 +1,26 @@ | ||
|
|
||
|
|
||
| var numberOfStudents = 15; | ||
| var numberOfMentors = 8; | ||
|
|
||
| var total = numberOfStudents + numberOfMentors; | ||
|
|
||
| // console.log(total) | ||
|
|
||
|
|
||
|
|
||
| var PercentageStudents = numberOfStudents / total; | ||
| var PercentageMentors = numberOfMentors / total; | ||
|
|
||
|
|
||
| var StudentsRound = Math.round(PercentageStudents * 100); | ||
| var MentorssRound = Math.round(PercentageMentors * 100); | ||
|
|
||
|
|
||
| console.log('Percentage students: ' + StudentsRound); | ||
| console.log('Percentage Mentors: ' + MentorssRound); | ||
|
|
||
|
|
||
| // // Percentage students: 65% | ||
| // // Percentage mentors: 35% | ||
| // // ``` |
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| function halve(number) { | ||
| // complete the function here | ||
|
|
||
|
|
||
| return number/2; | ||
| } | ||
|
|
||
| var result = halve(12); | ||
|
|
||
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 |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| function triple(number) { | ||
| // complete function here | ||
| return number * 3; | ||
| } | ||
|
|
||
| var result = triple(12); | ||
|
|
||
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
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 |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| // Declare your function first | ||
| function divide(a, b) { | ||
|
|
||
| return a /b ; | ||
| } | ||
| var result = divide(3, 4); | ||
|
|
||
| console.log(result); |
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 |
|---|---|---|
| @@ -1,5 +1,22 @@ | ||
| // Write your function here | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| function createGreeting(name) { | ||
| return 'Hello my name is ' + name; | ||
|
|
||
| } | ||
| var greeting = createGreeting("Daniel"); | ||
|
|
||
| console.log(greeting); | ||
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 |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| // Declare your function first | ||
| function total(a, b) { | ||
| return a + b; | ||
|
|
||
| } | ||
|
|
||
| // Call the function and assign to a variable `sum` | ||
|
|
||
| var sum = total(13, 124); | ||
|
|
||
| console.log(sum); |
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
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job Jihad, I think it should be removed all this empty line from line 2 until line 15, if you don't used .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your feedback Mohammed