Manchester | 26-ITP-May | Samreen Amjad | Sprint 2 | Exercises - #1292
Open
serveyano wants to merge 1 commit into
Open
Manchester | 26-ITP-May | Samreen Amjad | Sprint 2 | Exercises#1292serveyano wants to merge 1 commit into
serveyano wants to merge 1 commit into
Conversation
cjyuan
reviewed
Jul 30, 2026
Comment on lines
+1
to
+3
| function contains(array, target) { | ||
| return array.includes(target); | ||
| } |
Contributor
There was a problem hiding this comment.
Can this function pass the tests in contains.test.js?
| } | ||
|
|
||
| // Replaces + with space | ||
| queryString = queryString.replaceAll("+", " "); |
Contributor
There was a problem hiding this comment.
Common practice is to declare another variable to store the converted string.
Comment on lines
+13
to
+15
| let index = pair.indexOf("="); | ||
| if (!pair.includes("=")) { | ||
| index = pair.length; |
Contributor
There was a problem hiding this comment.
On line 14, checking the value of index is more efficient than calling .includes()
Contributor
There was a problem hiding this comment.
This file should contain Jest test script to test the function define in querystring.js.
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
I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
My changes meet the requirements of the task
I have tested my changes
My changes follow the [style guide]
(https://curriculum.codeyourfuture.io/guides/reviewing/style-guide/)
Changelist
Completed exercises for Sprint 2