-
-
Notifications
You must be signed in to change notification settings - Fork 546
Manchester | 26-ITP-Sep | Fatima Rouchi | Sprint 2 | Complete Sprint 2 Coursework #1581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fatimarouchi
wants to merge
20
commits into
CodeYourFuture:main
Choose a base branch
from
fatimarouchi:coursework/sprint-2
base: main
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.
+101
−15
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
24272b0
run console.log
fatimarouchi 0dafc76
complete ex. 1
fatimarouchi f9ccefc
complete 2-initials ex.
fatimarouchi 36977b2
complete 3-paths ex.
fatimarouchi d5bf539
test with console.log
fatimarouchi 36ef980
test with console.log
fatimarouchi fac3f30
complete 4-random ex.
fatimarouchi 7f1feef
add /* */ to the comment
fatimarouchi ee6445d
fix error in 1.js
fatimarouchi 1234dae
fix error in 2js
fatimarouchi 609693d
update 2.js
fatimarouchi 74efff6
complete 3.js ex.
fatimarouchi 357de94
complete 4.js ex.
fatimarouchi 5259e12
complete 1-percetage-change.js ex.
fatimarouchi 26b2e4d
fix error
fatimarouchi ceb48a4
complete 2-time-format.js ex.
fatimarouchi c2d1d08
complete 3-to-pounds.js ex.
fatimarouchi 896bdbc
Include dot in extracted file extension
fatimarouchi 60d1f16
fix explanation Explain Math.random() range
fatimarouchi 4e28617
explain range of possible values
fatimarouchi 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| This is just an instruction for the first activity - but it is just for human consumption | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| /* This is just an instruction for the first activity - but it is just for human consumption | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| */ |
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,4 +1,7 @@ | ||
| // trying to create an age variable and then reassign the value by 1 | ||
|
|
||
| const age = 33; | ||
| /*const makes the variable fixed, so age cannot be changed. to reassign the value | ||
| I need to change const to let. | ||
| */ | ||
| let age = 33; | ||
| age = age + 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 |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| // Currently trying to print the string "I was born in Bolton" but it isn't working... | ||
| // what's the error ? | ||
|
|
||
| console.log(`I was born in ${cityOfBirth}`); | ||
| /* The log was trying to use cityOfBirth before the variable exists. | ||
| JavaScript reads the code in order, so the variable must be declared before it is used.*/ | ||
| // I logged the message before creating the cityOfBirth variable, so JavaScript couldn't find it yet. I need to declare the variable before using it. | ||
| const cityOfBirth = "Bolton"; | ||
| console.log(`I was born in ${cityOfBirth}`); |
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,9 +1,18 @@ | ||
| const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.slice(-4); | ||
| /*const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.slice(-4);*/ | ||
|
|
||
| // The last4Digits variable should store the last 4 digits of cardNumber | ||
| // However, the code isn't working | ||
| // Before running the code, make and explain a prediction about why the code won't work | ||
| // Then run the code and see what error it gives. | ||
| // Consider: Why does it give this error? Is this what I predicted? If not, what's different? | ||
| // Then try updating the expression last4Digits is assigned to, in order to get the correct value | ||
|
|
||
| //This won’t work because cardNumber is a number, and numbers don’t have the slice method. | ||
| //console.log(`${last4Digits}`); | ||
| // when I run it I see: TypeError: cardNumber.slice is not a function because slice() only works on strings or arrays. | ||
| // To fix it, I need to turn the number into a string first, then slice the last 4 characters. | ||
| const cardNumber = 453787178094213; | ||
| const last4Digits = String(cardNumber).slice(-4); | ||
|
|
||
| console.log(last4Digits); |
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,6 @@ | ||
| const 12HourClockTime = "8:53pm"; | ||
| const 24hourClockTime = "20:53"; | ||
| /*const 12HourClockTime = "8:53pm"; | ||
| const 24hourClockTime = "20:53";*/ | ||
| //JavaScript does not allow variable names that start with digits. | ||
|
|
||
| const twelveHourClockTime = "8:53pm"; | ||
| const twentyFourHourClockTime = "20:53"; |
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.
Uh oh!
There was an error while loading. Please reload this page.