Home >Web Front-end >JS Tutorial >Instructions for using Math object in JavaScript_Basic knowledge
The Math object in JavaScript is an intrinsic object that provides basic mathematical functions and constants. Usage:
Math.[{property | method}]
Where property is a required option. A property name of the Math object.
method is required. A method name of the Math. object.
Math objects in JavaScript cannot be created using the new operator, and an error will be given if you attempt to do so. This object is created by the scripting engine when it is loaded. All its methods and properties are always available in scripts.