JS: The essence of Language note 12--Dynamic language features (2)

Source: Internet
Author: User

In parentheses:

  • Overrides that occur when a value is assigned:
(Object1 = function () {}). Prototype.value = 100;var obj1 = new Object1;console.log (obj1.value);  100
  • Rewrite of the syntax declaration phase://Will error, the general engine does not recognize the identifier declared in an expression;
(function Object2 () {}). Prototype.value = 100;

Rewrite:

  • Impact on the internal object system:
    • Override built-in constructor: The prototype property of any constructor is not affected by the built-in constructor, it is always created from a constructor in a system engine;
    • Rewriting the prototype of a built-in constructor: affects the internal object system;

JS: The essence of Language note 12--Dynamic language features (2)

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.