201506021641_ "JavaScript authoritative guide" (p25-38)

Source: Internet
Author: User
Tags root math square root

1. Using Unicode encoding

2. JavaScript has: function classes (functions), array classes (arrays), error classes (Error), regular classes (REGEXP), date classes (dates)

3. A piece of code showing the system time: var t = new Date (), var t1 =t.getfullyear () + "Year" +t.getmonth () + "month" + t.getdate () + "Day" + t.gethours () + "when "+ t.getminutes () +" min "+ t.getseconds () +" seconds "; alert (t1);

4. Javascrip prohibit octal

5.2 square root math.sqrt (2);

2 cubic root math.pow (2,1/3);

6. Max/max----->nan

sqrt (-N)-------->nan

7. Global variables infinity and Nan represent infinitely large and non-numeric.

Eg:var a = infinity; can be written and readable

var a1 = positive_infinity;//Read Only

8. IsNaN ();

Isfinite (); is a number or is not infinity,-infinity is return true

9. Because JavaScript is a drawback to floating point calculation, it is better to convert the amount into an integer "score" in financial calculations.

10.

201506021641_ "JavaScript authoritative guide" (p25-38)

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.