Manchester |26-ITP-Jan | Farancis Dore Etonkie | Sprint 2 | Module Structuring and testing data#1213
Open
FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
Open
Manchester |26-ITP-Jan | Farancis Dore Etonkie | Sprint 2 | Module Structuring and testing data#1213FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
Conversation
…ors and improve code functionality. The commit includes modifications to 0.js, 1.js, and 2.js to address variable declaration issues and parameter naming conventions.
…int-2/2-mandatory-debug/1.js, and Sprint-2/2-mandatory-debug/2.js have been staged for commit. The changes include fixing the sum function to return the correct result and correcting the getLastDigit function to use the parameter instead of a global variable.
…ation of the 3-mandatory-implement folder
…interpret/time-format.js
cjyuan
reviewed
Mar 11, 2026
Contributor
cjyuan
left a comment
There was a problem hiding this comment.
Code looks good, and well formatted.
Just one misinterpretation.
| console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`); | ||
|
|
||
| // =============> write your explanation here | ||
| // The function multiply takes two parameters, a and b, and logs their product to the console. However, it does not return any value, which means that when we try to use the result of multiply in the template literal, it will be undefined. This will lead to the output: "The result of multiplying 10 and 32 is undefined". To fix this, we need to modify the multiply function to return the product instead of just logging it. |
Contributor
There was a problem hiding this comment.
Could consider breaking a long comment into multiple lines so that others don't have to scroll horizontally in the editor to read the comment.
Comment on lines
1
to
+9
| // In Sprint-1, there is a program written in interpret/to-pounds.js | ||
|
|
||
| // You will need to take this code and turn it into a reusable block of code. | ||
| // You will need to declare a function called toPounds with an appropriately named parameter. | ||
|
|
||
| // You should call this function a number of times to check it works for different inputs | ||
| function toPounds(kilograms) { | ||
| return kilograms * 2.20462; | ||
| } |
Contributor
There was a problem hiding this comment.
In this exercise, the objective is to implement a function that, when given a pence string in the form "399p", returns a string representing the equivalent amount in British pounds.
You can use the code from an exercise in Sprint-1, or you can write your own code -- one or two lines of code should be enough.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Learners, PR Template
Self checklist
Changelist