Description of JavaScript reference types

Source: Internet
Author: User

A value (object) of a reference type is an instance of the application type. In ECMAScript, a reference type is a data structure used to organize data and functionality together to organize data and functionality together. They are also commonly used as classes in JavaScript, but this is not a proper salutation! because although ECMAScript is technically an object-oriented language, it does not have the basic structure of classes and interfaces supported by traditional object-oriented languages. More specifically, a reference type is more like a definition of an object, which describes the properties and methods that this class of objects have.

An object is an instance of a particular reference type. The new object is created with a constructor, followed by a constructor, where the constructor itself is a function, except that the function is defined to create the object. The following code:

var person=New Object ();

This line of code creates a new instance of the object reference type, and then saves the instance in the variable person. The constructor used is object, which defines the default properties and methods for the new object. The new object will have the default properties and methods defined in all systems as Object reference types!

Description of JavaScript reference types

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.