The _javascript technique of the JavaScript leak-collecting addendum

Source: Internet
Author: User
Tags variable scope
heap Heap value type
Original type (primitive type)
undefined:undefined (Note case: type/value, same below)
Null:null (Undefined derived from null)
Boolen:true/false
Number:number.max_value/number.min_value/nan isNaN () function (note: Changes in the new version are available)
String:
Type conversions:
Boolen ()/number ()/string () * * refers to the type name
ToString (): ToString (2/8/16)
Intparse ()/floatparse ():


Stack Stack Reference type
Predefined
Object:
Boolen:
Number:tofixed ()
String: (abbreviated)
Instanceof ()


operator
Delete
void <a href= "javascript:void (window.open (' About:blank '))" >click me</a>

Label Label:

Object:
Object is a unordered (distinct from array) collection of name-value pairs (properties and methods)
Create: New and {}
Extensions: Add new attributes to an object (meaning to modify the instance at run time!) ) Operator: "." or "[]"
Constructor: You can judge a type, but unlike typeof, it returns an object
Prototype: Structure of objects

properties: (variable)
Scope
var: local variable, that is, the variable scope is the most inner function body

Method: (function)
JavaScript supports the first class (first-class) function, which is processing the function as an object. So it can be assigned to a variable (=), stored as an array element, as a return value, and so on.

This
Simple memory:
Global functions (simple-declared functions in a page): Window
DOM event handler (function that handles DOM events): The DOM element associated with the event (attention event bubbling)
Constructor: the instance itself

Understand:
Typically, this is always pointing to the object that calls the function (the so-called "run-time determination")
Special case: Apply () and call (), which point to the parameter object of the above two functions

Closures:
Forms of Expression:
functions defined within a function

Function:
Ability to read other function internal variables
To connect functions inside and outside functions
Keep the values of these variables always in memory

Array:
An ordered (distinct from object) set of values that can be of different types

Created: New Array () or []
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.