Home >Web Front-end >JS Tutorial >Instructions for using Math object in JavaScript_Basic knowledge

Instructions for using Math object in JavaScript_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 19:06:381207browse

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn