JavaScript Math Object

1/22/2020 4:41:40 AM

JavaScript math object is pre define object we just use this function because our coding style will be simplified. If we use the function, we easily find the round figure of the digit or other facilities by the pre define function. Now given bellow some example code and explain the code:

<!DOCTYPE html>
<script type="text/javascript">
console.log(Math.pow(8, 2));
console.log(Math.min(0, 150, 30, 20, -8, -200));
console.log(Math.max(0, 150, 30, 20, -8, -200));

In this code we see the many type of function of the Math object. This function responsible to our code are more easily write and easily undatable. If we use the “Math.PI” function we get the PI value.