London | ITP-JAN26 | Ihor Taradaiko | Sprint 2 | Coursework/sprint-2#1046
London | ITP-JAN26 | Ihor Taradaiko | Sprint 2 | Coursework/sprint-2#1046ihortar wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| for (const ingredient of recipe.ingredients) { | ||
| console.log(ingredient); | ||
| } |
There was a problem hiding this comment.
Your code works.
Here is an alternative worth exploring: Since ingredient values are separated by '\n' in the output, we could also use Array.prototype.join() to construct the equivalent string and then output the resulting string.
There was a problem hiding this comment.
It seems more complex at first glance.
I will check out later how it works, as I don't fully understand reading it.
Thanks
| value = pair.slice(indexOfEquals + 1); | ||
| } | ||
|
|
||
| queryParams[key] = value; |
There was a problem hiding this comment.
Note: (No change required)
-
In real query string, both
keyandvalueare percent-encoded or URL encoded in the URL.
For example, the string "5%" is encoded as "5%25". So to get the actual value of "5%25"
(whether it is a key or value in the query string), we need to call a function to decode it. -
You can also explore the
URLSearchParamsAPI.
|
Changes look good. |
|
Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Changelist