JavaScript heavy Difficulty (prototype chain this) understanding there is always a process, do not hurry, step-by!

Source: Internet
Author: User

Start adding:

1. Use the function definition as the object's property, called the object method.
2. The point of this is determined by the context in which the function is called (context), not by the context in which the function is defined.
3. Because when a function is called as a function instead of a method, this points to a global object. Window object

One: Prototype chain:

1._proto_ this property

Two: this:

1.this refers to the object that called the function!

2.this refers to the global object.

Third: The global object in JavaScript

1. Window belongs to the DOM interface, which is not part of the core javascript!?

Article reference:

1. http://kb.cnblogs.com/page/55718/

JavaScript heavy Difficulty (prototype chain this) understanding there is always a process, do not hurry, step-by!

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.