Aida Zhukova | Sprint-2 - Module-Structuring-and-Testing-Data | SPRINT 2#242
Closed
aidazhukova wants to merge 11 commits intoCodeYourFuture:mainfrom
Closed
Aida Zhukova | Sprint-2 - Module-Structuring-and-Testing-Data | SPRINT 2#242aidazhukova wants to merge 11 commits intoCodeYourFuture:mainfrom
aidazhukova wants to merge 11 commits intoCodeYourFuture:mainfrom
Conversation
tyzia
reviewed
Jan 25, 2025
Sprint-2/1-key-errors/1.js
Outdated
| // =============> write your new code here | ||
|
|
||
| function convertToPercentage(decimalNumber) { | ||
| const percentage = `${decimalNumber * 100}%`; |
There was a problem hiding this comment.
Minor suggestion here - I don't think you need percentage variable here, you can directly return the result of your modification. It makes less code to read.
tyzia
reviewed
Jan 25, 2025
| // this function should square any number but instead we're going to get an error | ||
|
|
||
| // =============> write your prediction of the error here | ||
| // We call variable num inside the function,but it is not declared anywhere. |
There was a problem hiding this comment.
If our function doesn't declare num variable, where JS will look next for num variable?
Author
There was a problem hiding this comment.
It will try to find it outside the function.
tyzia
reviewed
Jan 25, 2025
| const sentence = "hello there"; | ||
| function toUpperSnakeCase(inputString) { | ||
| let underScore = inputString.replaceAll(" ", "_"); | ||
| console.log(underScore); |
There was a problem hiding this comment.
Please, remove this console.log. I think it was there for debugging.
tyzia
reviewed
Jan 25, 2025
| const remainingSeconds = seconds % 60; | ||
| const totalMinutes = (seconds - remainingSeconds) / 60; | ||
| const remainingMinutes = totalMinutes % 60; | ||
| const remainingSeconds = seconds % 60; // 1 |
tyzia
reviewed
Jan 25, 2025
| const totalMinutes = (seconds - remainingSeconds) / 60; // 1 | ||
| const remainingMinutes = totalMinutes % 60; // 1 | ||
| const totalHours = (totalMinutes - remainingMinutes) / 60; | ||
| console.log(totalHours); |
There was a problem hiding this comment.
I think this is debugging console, please, remove it from your final work.
|
Sorry for late response. Thank you for fixing all issues. Looks good now. Keep up good work! |
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
Homework for Sprint-2