There is a global object in S for ordinary calculation Math

It has a few methods for everyday calculations, and here are a few common ones

Math.floor(x) // Returns the largest integer less than x

Math. Floor (12.2) / / 12

Math.floor(15 / 2)  // 7

Math.ceil(x) // Returns the smallest integer greater than x

Math. Ceil (12.2) / / 13

Math.ceil(15 / 2)  // 8

Math.round() returns the rounded integer

Math. Round (12.2) / / 12

Math.round(15 / 2)  // 8

Math.random() returns a pseudorandom number between 0 and 1.

Math.cos(x) returns the cosine of x

Math.sin(x) returns the sine of x

Writing a blog is not easy, please like it if it helps you. Comment if you have time.