generated from CodeYourFuture/Module-Template
-
-
Notifications
You must be signed in to change notification settings - Fork 245
West Midlands | ITP-Sept-25 | Mustaf Asani | Sprint 3 | Coursework/sprint 3 implement and rewrite #795
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
asaniDev
wants to merge
30
commits into
CodeYourFuture:main
Choose a base branch
from
asaniDev:coursework/sprint-3-implement-and-rewrite
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.
Open
West Midlands | ITP-Sept-25 | Mustaf Asani | Sprint 3 | Coursework/sprint 3 implement and rewrite #795
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
26fd354
changed the name of the string in the function
asaniDev 5ab6322
removed line 10 and passed function to console
asaniDev 0c7cc6f
corrected the error with the function
asaniDev cc216e1
added a return to the function
asaniDev 90013dc
moved the return command to the line below it
asaniDev f63f7cf
created a function that returns the bmi
asaniDev a02b0c5
created a function that converts a given string to snake case
asaniDev e097316
created a toPounds function to return a pounds and pence notation
asaniDev 742c228
answered all the questions in the exercise
asaniDev 0d5ad45
wrote tests for any edge cases and fixed resulting bugs
asaniDev 2038048
made a function for angle types and added tests for all angles
asaniDev 7daf16b
added tests for most fraction types and conditions for them as well
asaniDev dfebb97
added conditions for all ranks in a deck of cards and tests for them
asaniDev 6865348
added jest tests for all angle types
asaniDev 43d650c
added jest tests for different card values
asaniDev 3ca95c6
took away comment on line 30
asaniDev c56bd67
revert multiple commits that were from sprint 2
asaniDev 2765c49
added tests for multiple samples, removed a test for ace of spades, c…
asaniDev 035e27e
removed check for ace of spades, adjusted rank to give the full value…
asaniDev 50ee9ef
corrected test for numerator is 0 to a proper fraction, and removed u…
asaniDev bcbd867
added a regex to make sure only exact number card value matches will …
asaniDev 137fd7c
added a few tests for negative improper fractions
asaniDev e5b18e4
added more tests to make the test suites more robust, moved ten to nu…
asaniDev 5fa3d08
removed console.log used for testing.
asaniDev d58910a
used regex pattern to check for ranks and removed includes method
asaniDev 8b52886
added dev dependencies
asaniDev 78f21df
revert changes to sprint 2 folder
asaniDev 8ad9d08
reverted changes to 1.js
asaniDev 14ddfad
reverted changes to 2.js in sprint 2 file.
asaniDev 1a5aada
revert unwanted change
asaniDev 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
Some comments aren't visible on the classic Files Changed page.
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,13 +1,23 @@ | ||
| // Predict and explain first... | ||
| // =============> write your prediction here | ||
| //we should have an error showing that str already exists so we cannot declare it again inside the function. | ||
|
|
||
| // call the function capitalise with a string input | ||
| // interpret the error message and figure out why an error is occurring | ||
|
|
||
| function capitalise(str) { | ||
| let str = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| return str; | ||
| } | ||
| //function capitalise(str) { | ||
| // let str = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| // return str; | ||
| //} | ||
|
|
||
| //console.log(capitalise("cat")); | ||
|
|
||
| // =============> write your explanation here | ||
| //str has been passed down as a parameter so we cannot declare it again. we would need to declare a different variable name. | ||
| // =============> write your new code here | ||
| function capitalise(str) { | ||
| let capitalisedStr = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| return capitalisedStr; | ||
| } | ||
|
|
||
| console.log(capitalise("cat")); |
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,20 +1,23 @@ | ||
|
|
||
| // Predict and explain first BEFORE you run any code... | ||
|
|
||
| // this function should square any number but instead we're going to get an error | ||
|
|
||
| // =============> write your prediction of the error here | ||
| //it will throw an error for use of a primitive value instead of a variable. | ||
|
|
||
| function square(3) { | ||
| return num * num; | ||
| } | ||
| //function square(3) { | ||
| // return num * num; | ||
| //} | ||
|
|
||
| // =============> write the error message here | ||
| // =============> write the error message here, SyntaxError: Unexpected number | ||
|
|
||
| // =============> explain this error message here | ||
|
|
||
| //this error message is becasue we cannot pass a direct value to a function when creating it but rather when we call it. Instead we need to give it a parameter that can then hold the value that we want to pass to the function. | ||
| // Finally, correct the code to fix the problem | ||
|
|
||
| // =============> write your new code here | ||
| function square(num) { | ||
| return num * num; | ||
| } | ||
|
|
||
|
|
||
| console.log(square(3)); |
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.
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.