-
-
Notifications
You must be signed in to change notification settings - Fork 546
North West | 26-ITP-SEPT | Brian Yorachi | Sprint 2 | Complete Sprint 2 Coursework #1560
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
BrianY315
wants to merge
20
commits into
CodeYourFuture:main
Choose a base branch
from
BrianY315: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.
+80
−12
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4ad25d3
Restore prep work for Sprint 2
BrianY315 cbfb181
Complete count exercise
BrianY315 40cbf97
Complete initials exercise
BrianY315 52f3451
Complete paths exercise
BrianY315 c05aa85
Complete random number exercise
BrianY315 05cb7b5
Document error explanation example
BrianY315 2edba64
Fix reassignment error
BrianY315 0fc0771
Fix city declaration error
BrianY315 80bc588
Fix card number slicing error
BrianY315 f34c0da
Fix invalid variable names
BrianY315 6a10112
Complete percentage change interpretation
BrianY315 28d1d37
Complete time format interpretation
BrianY315 dbf28af
Complete pounds conversion interpretation
BrianY315 4b2b429
Complete objects stretch task
BrianY315 0e5b329
Complete Chrome console stretch task
BrianY315 820cbc8
Add count exercise explanation
BrianY315 b93c32a
Correct time format interpretation count
BrianY315 440a54b
Remove stray prep files from Sprint 2 branch
BrianY315 f467e43
Address review comments for paths and random exercises
BrianY315 b56bc9b
Correct console log line in percentage explanation
BrianY315 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,6 +1,9 @@ | ||
| let count = 0; | ||
|
|
||
| count = count + 1; | ||
| console.log(count); | ||
|
|
||
| // Line 1 is a variable declaration, creating the count variable with an initial value of 0 | ||
| // Describe what line 3 is doing, in particular focus on what = is doing | ||
| // Line 3 is using the assignment operator (=) to update the value of count. | ||
| // It reads the current value of count, adds 1 to it, and then stores the result back into count. | ||
| // So the value changes from 0 to 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
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,7 @@ | ||
| 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 only for human consumption. | ||
| // We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| // | ||
| // To stop JavaScript from running them, turn them into comments: | ||
| // | ||
| // const 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,4 +1,6 @@ | ||
| // trying to create an age variable and then reassign the value by 1 | ||
|
|
||
| const age = 33; | ||
| let age = 33; | ||
| // Use let instead of const so the value can be reassigned. | ||
| age = age + 1; | ||
| console.log(age); |
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,6 @@ | ||
| // 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}`); | ||
| const cityOfBirth = "Bolton"; | ||
| // Declare the variable before using it in the template literal. | ||
| 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
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,5 @@ | ||
| const 12HourClockTime = "8:53pm"; | ||
| const 24hourClockTime = "20:53"; | ||
| // Variable names cannot begin with a number, so use descriptive names instead. | ||
| const twelveHourClockTime = "8:53pm"; | ||
| const twentyFourHourClockTime = "20:53"; | ||
| console.log(twelveHourClockTime); | ||
| console.log(twentyFourHourClockTime); |
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 |
|---|---|---|
|
|
@@ -8,8 +8,12 @@ Let's try an example. | |
| In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`; | ||
|
|
||
| What effect does calling the `alert` function have? | ||
| It shows a pop-up dialog box with the message "Hello world!" and pauses the browser until the user closes it. | ||
|
|
||
| Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`. | ||
|
|
||
| What effect does calling the `prompt` function have? | ||
| It displays a dialog box asking the user for input. | ||
|
|
||
| What is the return value of `prompt`? | ||
| The return value is the text entered by the user as a string. If the user cancels the prompt, it returns `null`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excellent, precise and concise! |
||
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
Oops, something went wrong.
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.
Please breaking down the expression in line 4 and explain what it means.
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.
I’ve added this breakdown to the comments in 4-random.js. The expression generates a random whole number from 1 to 100, inclusive. Thank you for the feedback.