JS: The essence of Language Note 4----Object-oriented Programming overview

Source: Internet
Author: User

instance creation : obj = new contructor[(arguments)]; If there are no arguments to omit the parentheses, note that this is not a function call;

Direct Volume vs. initializer: The direct amount is separated from the initializer in the preceding basic expression, because the declaration of the direct volume does not include the operation process, and the declaration of the initializer can include the operation process.

  • Direct volume: generally divided into 6 kinds, including the regular expression declaration; In the engine's view, its value is known at compile time;
  • Initializers: Include functions, objects, array declarations, which may not be expected by itself.

Object:

  • Delete: The ability to delete most members of an object, including members of global object globals, cannot delete var declaration variables and members that inherit directly from the prototype; returns false only if a member cannot be deleted;
  • In: Object member check (both inherited and non-enumerable): string in object;
  • For/in: Enumerating object members (including inheritance);
  • propertyIsEnumerable (): Enumerates object members (not including inheritance);

JS: The essence of Language Note 4----Object-oriented Programming overview

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.