-
-
Notifications
You must be signed in to change notification settings - Fork 387
Birmingham | ITP-May26 | Ogbemi Mene | Sprint 1 | Coursework/sprint1 #1415
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
meneogbemi42-bit
wants to merge
21
commits into
CodeYourFuture:main
Choose a base branch
from
meneogbemi42-bit:coursework/sprint1
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.
+196
−10
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
fa9f5e6
age declearation
8b14301
count num
b068348
for name arrangment
1306b9c
math solving
fa09cac
covering card number
74c5586
percentage representation
41d7543
variable declearation
1431ccf
initial declearation
6f4f1b7
variable path
2198c0b
num value
a1593bb
commenting data
ce41270
correcting code
6842ec5
correcting error
4fc7fc8
ex[laining code
1b39660
identification of wrong variable
9cb856a
answer to this question asked
c0e0589
answers to movie lenght
6c9a6fa
step by step breakdown
25c9548
answer to chrome.md
5bb384f
chrome solution
43833ef
unwanted file removal
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,13 @@ | ||
| 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 updating the value of the variable `count`. | ||
| //The `=` operator is an assignment operator, | ||
| //which means it takes the value on the right side (in this case, `count + 1`, | ||
| //which evaluates to 1) and assigns it to the variable on the left side (`count`). | ||
| //So after this line executes, the value of `count` will be updated 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,5 @@ | ||
| 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? | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
|
|
||
| //to answer this question, we can use comments in our code. | ||
| //In JavaScript, we can use `//` for single-line comments or `/* */` for multi-line comments. |
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,12 @@ | ||
| const 12HourClockTime = "8:53pm"; | ||
| const 24hourClockTime = "20:53"; | ||
|
|
||
| // The error in the code is that the variable `12HourClockTime` starts with a number, | ||
| // which is not allowed in JavaScript variable names. | ||
| // Variable names must start with a letter, underscore (_), or dollar sign ($). | ||
| // To fix this error, we can rename the variable to start with a letter, | ||
| // such as `twelveHourClockTime` or `hour12ClockTime`. | ||
| const twelveHourClockTime = "8:53pm"; | ||
| const hour24ClockTime = "20:53"; | ||
| // you can ether put the number at thr end of the variable name or spell it out in words, | ||
| // but you cannot start a variable name with a number. |
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 |
|---|---|---|
|
|
@@ -12,7 +12,12 @@ invoke the function `alert` with an input string of `"Hello world!"`; | |
|
|
||
| What effect does calling the `alert` function have? | ||
|
|
||
| The Effect: Calling alert pauses the browser execution and triggers a modal pop-up dialog box at the top of the screen displaying the text "Hello world!". It includes an "OK" button that the user must click to dismiss the alert and resume interacting with the page. | ||
|
|
||
| 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? | ||
|
|
||
| The Effect: Calling prompt opens a different type of pop-up dialog box that displays the message "What is your name?", a text input field for the user to type into, and two buttons: "OK" and "Cancel". | ||
| What is the return value of `prompt`? | ||
| The Return Value: * If you type a name (e.g., "Alex") and click OK, the function returns that exact text as a string (undefind). This string is what gets stored in your myName variable. | ||
|
Contributor
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. What if a user types a name and then click Cancel instead of OK? |
||
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.
Operation like
count = count + 1is very common in programming, and there is a programming term describing such operation.Could you find out what one-word programming term describes the operation on line 3?