Nice write up. You could add an example with a negative number for Math.round().
About the use of Infinity, I think it’s useful when you are comparing results. If you do something like if(1/x > 1/y) and one of x or y turns out to be 0, then the comparison still works.
Nice write up. You could add an example with a negative number for
Math.round().About the use of
Infinity, I think it’s useful when you are comparing results. If you do something likeif(1/x > 1/y)and one ofxoryturns out to be0, then the comparison still works.Thanks! I've added the example and your note on the use of infinity.