top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the use of Math Object in JavaScript?

+3 votes
66 views
What is the use of Math Object in JavaScript?
posted Jul 29, 2015 by Shivaranjini

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

The math object provides you properties and methods for mathematical constants and functions.

Code

var x = Math.PI; // Returns PI

var y = Math.sqrt(16); // Returns the square root of 16

var z = Math.sin(90);    Returns the sine of 90
answer Aug 6, 2015 by Manikandan J
...