Create an object using javaScript

Source: Internet
Author: User

Create an object using javaScript
1. The object ECMA-262 defines the object as a set of unordered attributes, whose attributes can contain basic values, objects or functions. Therefore, objects in js are a set of key-value pairs. In object-oriented languages, you can use classes to create any number of object instances with the same attributes and methods. However, js does not have the concept of class. Next, I will use an example to illustrate the philosophy of js without the concept of "class. This will confuse beginners, but it is also because the concept of "class" is put down that js objects have no vitality in other programming languages. In fact, the "class" of objects in js is constantly evolving from nothing to existence, and eventually disappears from the invisible. For example, in the story of Xiao looking for his mother, Xiao gradually becomes the same class as his mother in the process of its own type evolution ". <! DOCTYPE html> <meta charset = "UTF-8">

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.