-
-
Notifications
You must be signed in to change notification settings - Fork 239
London | 25-ITP-SEP | Mariia Serhiienko| Sprint 2 | Coursework/sprint-2 #832
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
base: main
Are you sure you want to change the base?
Conversation
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
1 similar comment
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
jennethydyrova
left a comment
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.
Hi @Konvaly! Very clean code, nice work! There are couple of issues I pinpointed, could you please address those?
Also, could you please remove package-lock.json file from this PR as it's not related?
Sprint-2/1-key-errors/0.js
Outdated
| let capitalisedStr = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
| return capitalisedStr; |
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.
This is correct but can you think of a way to simplify it? Also, does it need to be let?
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.
Yes, "const" might be better option, cause I don't need to change "capitalisedStr" in next evalutaion of my function.
About simplifying - actually I can return the result without any defined variable.
Sprint-2/1-key-errors/1.js
Outdated
| const percentage = `${decimalNumber * 100}%`; | ||
|
|
||
| return percentage; |
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.
Same as my previous comment for capitalise function, can you think of a way to simplify it?
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.
I simplified this function in the same way like with previous task :)
| // Predict and explain first... | ||
|
|
||
| // =============> write your prediction here | ||
| // =============> I think the result will be undefined because in the function there is no return statement. |
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.
Very good guess!
Sprint-2/2-mandatory-debug/0.js
Outdated
|
|
||
| // Finally, correct the code to fix the problem | ||
| // =============> write your new code here | ||
| // =============> function multiply(a, b) { |
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.
I think you would want to comment out the broken code and have your fixed code uncommented. Same for other files.
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.
Thank you! It was confusing for me because there weren't some clear instructions about what do I have to comment/uncomment.
Now I've done this due to your recommendation.
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.
I'll note this!
| // Predict the output of the following code: | ||
| // =============> Write your prediction here | ||
| // =============> The output will be: | ||
| // 1. The last digit of 42 is 3 |
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.
Nice!
Sprint-2/2-mandatory-debug/2.js
Outdated
| // Finally, correct the code to fix the problem | ||
| // =============> write your new code here | ||
|
|
||
| //=============> const num = 103; |
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.
I think the point of this exercise is not to declare any global variables and just pass all the numbers as function arguments
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.
I also thought about it , but I was sure that I have to change only function. My bad!
| // Use the MDN string documentation to help you find a solution | ||
| // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase | ||
|
|
||
| function toUpperCaseSnakeString(str) { |
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.
This is fine but could be better. Do you need to say string here? Think of other string methods such as toUpperCase or to toLowerCase. Can you think of a better name?
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.
You're right, I changed this name to "toUpperSnakeCase".
|
|
Hi @Konvaly! All your answers are correct but I don't see changes applied. Did you forget to push? |
|
Hi @jennethydyrova ! I've pushed it just now and added some tests and fixed bugs in 5-stretch-extend.js. |
|
hi @Konvaly ! I am happy to approve this PR but you have your pipeline failing. Can you please fix it? |
Self checklist
This PR covers work across all main sections of the sprint project:
Errors: Checked each file in the errors folder, predicted and explained what errors occur, and why they happen.
Debug: Found and fixed issues in the debug files, explaining why the code wasn’t working and verifying the fixes.
Implement: Built and tested functions for 1-bmi.js, 2-cases.js, and 3-to-pounds.js to meet the given requirements.
Interpret: Reviewed and explained how the larger programs work, using console.log and docs to understand unfamiliar parts.
Extend: Wrote tests and fixed any bugs for the 24-hour to 12-hour time conversion function.
All tasks now run correctly, with clear explanations and working code throughout.