What is the use of Math object in JavaScript?

Forums JavaScriptWhat is the use of Math object in JavaScript?
Staff asked 3 years ago

Answers (1)

Add Answer
Nayan Raval Marked As Accepted
Staff answered 3 years ago

To conduct a mathematical operation, the JavaScript math object includes numerous constants and methods. It does not have constructors, unlike the date object. Consider the following scenario:

function display()  
{  
  document.writeln(Math.random());  
}  
display();

 

Subscribe

Select Categories