In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the knowledge of "what are the common built-in objects in javascript and how to use them?" in the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Common built-in objects in javascript are Array objects, Math objects, Date objects, and String objects. A built-in object is an object that comes with javascript itself.
This article operating environment: windows10 system, javascript 1.8.5, thinkpad T480 computer.
The built-in objects in javascript actually refer to the objects that come with javascript itself and provide some common functions.
There are four common built-in objects, which are:
Array object: provides an array model to store large amounts of ordered data.
Math object: can handle all mathematical operations.
Date object: can handle the storage, conversion, and expression of dates and times.
String object: can handle all string operations.
Example of mathematical object code:
Console.log (Math); console.log (Math.PI); / / output is π console.log (Math.floor (1.9)); / / rounding console.log down (Math.ceil (1.1)); / / rounding console.log up (Math.round (4.3)); / / rounding console.log (Math.abs (- 33)) / / take the absolute value console.log (Math.max (1, 2, 3, 4, 5)); / / take the maximum value console.log (Math.max.apply (null, [1, 2, 3, 4, 5]); / / null means that the this pointer does not replace console.log (Math.min (1, 2, 3, 4, 5)) / / take the minimum value console.log (Math.min.apply (null, [1,2,3,4,5]); console.log (Math.sqrt (100)); / / squared console.log (Math.pow (5,3)); / / Power, 5 to the third power console.log (Math.sin (90 * Math.PI / 180)) / / Sine, Radian = Angle * π / 180 console.log (Math.cos (180 * Math.PI / 180)); / / CoSine console.log (Math.tan (90 * Math.PI / 180)); / / tangent "what are common built-in objects in javascript and how to use them" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.