Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homework Feedback - Node Week 3 #11

Open
jawkha opened this issue Sep 26, 2019 · 0 comments
Open

Homework Feedback - Node Week 3 #11

jawkha opened this issue Sep 26, 2019 · 0 comments

Comments

@jawkha
Copy link

jawkha commented Sep 26, 2019

Calculator Exercise

Nice work on implementing the calculator. However, there's a bug here. One of the requirements was to account for situations where the same query parameter is used multiple times, e.g. calculator/multiply?firstParam=1&secondParam=2&secondParam=4
The way you have implemented it, such queries return NaN instead of the solution due to the fact that all the values with the same query parameter (secondParam in this case) are aggregated in an array and a Number conversion operation on each query parameter without first checking whether it's a String or something else leads to this problem.

numbers.push(Number(req.query[key]));

Meal Sharing Website

Please let me know if you found it difficult to implement this part of the homework or just couldn't make time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant