Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
| throw new Error("parseQueryString requires a string"); | ||
| } | ||
|
|
||
| queryString = decodeURIComponent(queryString); |
There was a problem hiding this comment.
What happens to name=Sam%26Lee after the whole string is decoded and then split on &?
To "like" or "dislike" this comment, please follow this link
| function createLookup() { | ||
| // implementation here | ||
| function createLookup(codes) { | ||
| if (!codes || !Array.isArray(codes[0])) { |
There was a problem hiding this comment.
What does the loop produce for [ ["US", "USD"], "CA" ], even though the input is not an array of arrays?
To "like" or "dislike" this comment, please follow this link
| const key = pair.substring(0, splitIndex).replace("+", " "); | ||
| const value = pair.substring(splitIndex + 1).replace("+", " "); |
There was a problem hiding this comment.
What value does parseQueryString("name=John+Van+Doe") produce when each call to replace changes only the first +?
To "like" or "dislike" this comment, please follow this link
| if ( | ||
| Array.isArray(obj) || | ||
| typeof obj === "string" || | ||
| typeof obj === "number" || | ||
| !obj |
There was a problem hiding this comment.
What does contains(true, "x") do, and does it follow the function's non-object error contract?
To "like" or "dislike" this comment, please follow this link
| // But an object is not iterable and you can't reach a value through an index | ||
| // You need to find it using the key, houseNumber | ||
| // So I think there will be an error as the code treats address as an array when it is an object. |
There was a problem hiding this comment.
How does address[0] behave differently from trying to iterate over address?
To "like" or "dislike" this comment, please follow this link
|
The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look. |
Learners, PR Template
Self checklist
Task code
CYF-1083
Changelist
Completed the exercises in sprint 2.