You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 aNumber
conversion operation on each query parameter without first checking whether it's aString
or something else leads to this problem.hyf-homework/nodejs/week3/calculator/index.js
Line 8 in 5c41f37
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.
The text was updated successfully, but these errors were encountered: