Internal objects, host objects, custom objects in JavaScript

Source: Internet
Author: User

Links: https://www.nowcoder.com/questionTerminal/63bc9543a21b43d59c45684bffb7c014
Source: Niu Ke Net

JS, the object can be divided into "internal object", "host Object" and "custom object" three kinds. 1, internal object JS internal objects include array, Boolean, Date, Function, Global, Math, Number, object, REGEXP, String, and various error class objects, including errors, Evalerror, Rangeerror, Referenceerror, SyntaxError and TypeError. The two objects, global and math, are also known as " built-in objects ," which are created when the script is initialized and do not have to instantiate both objects.
2. Host Object
The host object is the object provided by the environment that executes the JS script. For JS embedded in the Web page, the host object is the object provided by the browser, so it is also called the browser object, such as IE, Firefox and other browser-provided objects. Different browsers provide host objects that may be different, even if they are provided with the same object, and they are implemented in a variety of ways! This can lead to browser compatibility issues and increase the difficulty of development. There are many browser objects, such as window and documen,element,form,image, and so on.
3. Custom Objects
As the name implies, it is the developer's own defined object. JS allows the use of custom objects, so that JS applications and functions are expanded

Internal objects, host objects, custom objects in JavaScript

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.