Glasgow | May-2025 | Mansoor Munawar | Sprint 2#753
Glasgow | May-2025 | Mansoor Munawar | Sprint 2#753MansoorM11 wants to merge 11 commits intoCodeYourFuture:mainfrom
Conversation
…also created tests using jest for it
…eated test for it by using Jest
…d also created tests for it
…sts for it using Jest
…and also created tests for it
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work - I just have spotted one possible issue in your contains exercise
There was a problem hiding this comment.
What happens if you pass it some input like contains([1,2,3,4], "length") - remember one of your test specifications says it should give false when passed an array
There was a problem hiding this comment.
I saw that it returns true because arrays in Javascript has own length property. I managed to refactor my code to take this into account and now it returns false. Thanks
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Data Groups) doesn't match expected format (example: 'Sprint 2', without quotes) |
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: Sprint part (Data Groups) doesn't match expected format (example: 'Sprint 2', without quotes) |
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Data Groups) doesn't match expected format (example: 'Sprint 2', without quotes) |
|
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 |
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 |
|
This change solves this issue. When implementing things like this in the future, make sure you understand what the program specification is asking for. Here you added a condition that specifically checks for arrays and the property "length". Try re-reading the specification in the test file for that task - can you see how you could improve your implementation? |
|
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 |
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 |
|
I understood the requirement, but I didn’t realise that arrays are treated like objects and their indices are used as keys. That’s something new I learned today. Thanks! So now the updated code will return false for an array as a parameter. |
|
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 |
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 |
|
Great! You are now done with this sprint, you can close the PR now |
|
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 |
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 |
Self checklist
Changelist
Briefly explain your PR.
I completed the exercises for sprint-2 which included degbugging programs, implementing function and test based on set requirement, and leaving comments detailing program execution and where the bug is located within the program.
Questions
Ask any questions you have for your reviewer.