The Math object allows us to perform mathematical tasks.
Math is not a constructor. All properties/methods of Math can be called by using Math as an object, without creating it.
Math is not a constructor. All properties/methods of Math can be called by using Math as an object, without creating it.
Syntax
var x = Math.PI; // Returns PI
var y = Math.sqrt(16); // Returns the square root of 16
No comments:
Post a Comment