Front End Basics Review notes

Source: Internet
Author: User

Recently reviewed the basics of the front-end, write a note to facilitate the review again.

1. Delay Script: Add defer property, the script will be delayed until the entire page is resolved after the operation. The Defer property is used only for external script files.

<script type= "Text/javascript" defer= "defer" src= "Example.js" ></script>

2. Asynchronous script: Add Async property, only for external script files, similar to defer.

<script type= "Text/javascript" async= "async" src= "Example.js" ></script>

3. The value of the e notation equals the number in front of e multiplied by the exponential power of 10.

4.NaN is used to indicate a case in which an operand that would have returned a numeric value did not return a number

5. Numeric conversion: Number () parseint (), parsefloat () can receive two parameters, one for numeric value and one for several binary

String conversions: ToString (), which receives a parameter that is a binary

6.for-in statement:

for (var propname in window) {
      document.write (propname);
}
7.with statement: Set the scope of the code to a specific object
With (location) {
      var qs=search.substring (1);
      var hostname=hostname;
      var url=href;
}
8. Detection array, conversion method: toLocaleString (), toString (), valueof ()

9. Separator: Join () method (string);

Stack method: Push (), pop ();

Queue method: Push (), shift ();

Reordering: reverse ();


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.