generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 272
LONDON11 | Karla Grajales | Sprint-1 - Module-Structuring-and-Testing-Data | SPRINT 1 #135
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
Closed
Closed
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
0fd575d
done 1.js
Grajales-K b9595e1
done errors 2.js
Grajales-K 049285a
done error 3.js
Grajales-K b401696
done error 4.js
Grajales-K 9facd61
done exercises count.js
Grajales-K 45eab06
done exercises count.js
Grajales-K bcff939
done exercises decimal.js
Grajales-K 1f01abe
done exercises paths.js
Grajales-K 7134015
adding a function on random.js to check the result
Grajales-K 80ba22b
updateing the line in errors
Grajales-K daab521
updating random.js
Grajales-K 771f1cb
done initials.js
Grajales-K 78ab25c
done chrome.md
Grajales-K f100a1b
done updating spaces paths.js
Grajales-K 4341313
updating time in the variables with the correct time
Grajales-K 7332754
done objects.md
Grajales-K c25a3b1
done percetage-change.js
Grajales-K 7ed2bbc
update percetage-change.js
Grajales-K e4e308f
done time-format.js
Grajales-K 6bf5f7f
done to-pounds.js
Grajales-K 7590fd3
update PR
Grajales-K 5ab71ca
update explanation on line 3 about = operator
Grajales-K 3f47448
Updated explanation for better undestating on how works the remaining…
Grajales-K 3ea9f36
added another var name option in line 55
Grajales-K dd9ef66
add a console.log to show the typeof variable
Grajales-K 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
| 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? | ||
| // 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? | ||
|
|
||
| // To make a multi-line comment in JavaScript, you can start with /* and end with */ . Any text | ||
| // in between will be considered a comment and will not be executed as code by the computer. |
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,15 @@ | ||
| // trying to create an age variable and then reassign the value by 1 | ||
|
|
||
| const age = 33; | ||
| // to run this file we need to go in the root and once we are in the file run, node 1.js eg => cd /Sprint-1/errors => ~ node 1.js | ||
|
|
||
|
|
||
| // this line is not working because const does not allow you change the data so we can change to let. | ||
| // cost age. = 33; | ||
| // age = age + 1; | ||
| // console.log(age); | ||
|
|
||
|
|
||
| let age = 33; | ||
| 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,9 @@ | ||
| // 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"; | ||
| console.log(`I was born in ${cityOfBirth}`); | ||
|
|
||
| // we just need to move the console.log() to avoid render and expression which was calling the data declared in the variable | ||
| //ReferenceError: Cannot access 'cityOfBirth' before initialization |
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,28 @@ | ||
| 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 | ||
|
|
||
|
|
||
| // const cardNumber = 4533787178994213; | ||
| // const last4Digits = cardNumber.(-4); | ||
|
|
||
| // console.log(last4Digits); | ||
|
|
||
|
|
||
|
|
||
| // String.prototype.slice() | ||
| // The slice() method of String values extracts a section of this string and returns it as a new string, | ||
| // without modifying the original string. but in this example we have number we can extract this. | ||
| // 1 slice work only with String | ||
| // 2 we have to convert the variable to String | ||
| // 3 Option we can just added a single quotation but this variable is saving number. | ||
|
|
||
|
|
||
| const cardNumber = 4533787178994213; | ||
| const last4Digits = cardNumber.toString().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,12 @@ | ||
| const 12HourClockTime = "20:53"; | ||
| const 24hourClockTime = "08:53"; | ||
| // const 12HourClockTime = "20:53"; | ||
| // const 24hourClockTime = "08:53"; | ||
|
|
||
| // this is given an error because we can no start an variable starting naming with number, So we can fix moving the number | ||
| // in the middle or we can write the number instead declare the integer number | ||
|
|
||
| const hour12ClockTime = "8:53"; | ||
| console.log(hour12ClockTime); | ||
|
|
||
|
|
||
| const hour24ClockTime = "20:53"; | ||
| console.log(hour24ClockTime); |
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,10 @@ | ||
| // 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 | ||
|
|
||
| let count = 0; | ||
|
|
||
| count = count + 1; | ||
| console.log(count); | ||
|
|
||
| // line 3 is taking the first value and reassigns this new value to count its value + the number 1 | ||
|
|
||
| // 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 | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.