There are math functions built into js to do the heavy lifting on math and algorithms that are needed in a program. I only have gone through finite math in college. No trig or calc. But I do understand and can solve calc problems. I just don’t understand them.

Anyway, there are entire calculations for js

Math.round()

Math.floor() returns the closest whole integer to the whole number as in gas 1.049 is then 1. This would stink for a teacher to use in class. If a student got a 89.95, they would have an 89.

As I get older I sure do understand numbers more. Probably just like that there is only one answer.

Then there is putting it into an alert,

alert(Math.round(‘38.5 degrees’); will give 39 as the answer.

I think that at the end of the math you can put an ; with no problems but their is none unless it is inside another code sequence.

### Like this:

Like Loading...