Repository navigation
London | 26-ITP-Sep | Shirin Panahian | Sprint 2| Complete sprint 2 exercises - #1516
shirinpanahian wants to merge 8 commits into
Conversation
|
Thank you for this PR. Great work completing the Sprint 2 exercises and adding tests. I can see two small JavaScript edge cases to fix before merging: tally.js (line 12): Plain objects inherit built-in keys like toString, so tally(["toString"]) tries to add 1 to a function instead of returning { toString: 1 }. Using Object.hasOwn() or Object.create(null) fixes this. querystring.js (line 38): Assigning "proto" directly to a normal object changes its prototype instead of saving it as a key. Using Object.create(null) or Object.defineProperty() handles it safely. |
|
Thank you for the feedback and the helpful explanations! I've fixed both edge cases using I've also added tests to cover these cases and pushed the updates to the PR. Thanks again for the review!
|
Learners, PR Template
Self checklist
Task code
CYF-1083
Changelist
This PR includes my work for Sprint 2 of the Module Data Groups project.
contains,lookup,tally, andquerystring. Tested the functions with different inputs to verify their behaviour.console.log().This sprint helped me improve my JavaScript problem-solving, debugging, implementation, and code-reading skills.