JavaScript Math Object Methods

Source: Internet
Author: User
Tags natural logarithm square root

1Console.log (Math.Abs (123));//Absolute Value2 3Console.log (Math.ceil (123.3));//Rounding up4 5Console.log (Math.floor (123));//Rounding Down6 7Console.log (Math.max (x, y));//highest value in X, y8 9Console.log (Math.min (123));//lowest value in x, yTen  OneConsole.log (Math.pow (x, y));//y power of x A  -Console.log (Math.random ());//random number of 0~1 -  theConsole.log (MATH.SQRT (x));//the square root of a number -  -Console.log (Math.Round (x));//number rounded to the nearest integer -  +Console.log (Math.acos (x));//the inverse cosine value of the returned number.  -  +Console.log (Math.asin (x));//returns the inverse chord value of the number.  A  atConsole.log (Math.sin (x));//returns the sine of a number.  -  -Console.log (Math.tan (x));//returns the tangent of a corner.  -  -Console.log (Math.tosource (x));//returns the source code for the object.  -  inConsole.log (Math.log (x));//returns the natural logarithm of the number (bottom is e). 

JavaScript Math Object Methods

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.