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 ();