Problem
Please click the link below to view the Problem Statement
Solution
The static function
Math.min()
returns the lowest-valued number passed into it, orNaN
if any parameter isn't a number and can't be converted into one.— MDN Web Docs
I put comments next to each line of code in the gist above to explain what is happening step by step.
Conclusion
Thank you so much for stopping by! Stay tuned for more Algorithm Content. Java Style!
Please checkout my online portfolio and feel free to connect with me on Linkedin!
Sources:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/min