In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "round,pow,sqrt,abs instance operation analysis of JavaScript Math function". In daily operation, I believe that many people have doubts about the operation analysis of round,pow,sqrt,abs instance of JavaScript Math function. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "round,pow,sqrt,abs instance operation analysis of JavaScript Math function". Next, please follow the editor to study!
The JavaScript Math object allows you to perform mathematical tasks on numbers.
Example
Math.PI; / / returns 3.141592653589793
Math.round ()
The return value of Math.round (x) is x rounded to the nearest integer:
Example
Math.round (6.8); / / returns 7
Math.round (2.3); / / return 2
Math.pow ()
The return value of Math.pow (x, y) is the y power of x:
Example
Math.pow (8, 2); / / return 64
Math.sqrt ()
Math.sqrt (x) returns the square root of x:
Example
Math.sqrt (64); / / returns 8
Math.abs ()
Math.abs (x) returns the absolute (positive) value of x:
Example
Math.abs (- 4.7); / / returns 4.7
At this point, the study of "round,pow,sqrt,abs instance operation analysis of JavaScript Math function" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.