Rhino-6 objects

Source: Internet
Author: User

Object: String-to-value ing; self-contained attributes; inherited attributes

String, number, and Boolean value: they are not objects. When their attributes are referenced, JS will call new XXX () to convert them into objects. When the reference ends, the temporary object (wrapped object) will disappear. Attribute assignment is ignored. You can also display the packaging object. Typeof: object. No practical significance

Operate on objects through reference

VaR x = {Name: 'sfp'}; var y = x; X. Name = 'wj'; console. Log ('Y. Name: '+ Y. Name );

Attribute name: empty string

VaR x = {Name:'s ', '': 'sfp'}; For (var key in X) {If (Key ='') {console. log (Key + ':' + X [Key]); // note the value format }}

The property value allows getter or setter Functions

Each attribute has the property features: can be written before 5, can be enumerated (for in can be output), can be configured (delete, modify ).

Object Features: Prototype, class, extensible flag.

Built-in object, Host Object (htmlelement, also built-in), custom object, own attribute, inherit attribute.

Historical reasons: the attribute name is reserved and must be enclosed by quotation marks. The last comma must be added. The attribute name contains spaces, hyphens, and reserved words. quotation marks are required.

Rhino-6 objects

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.