Home  >  Article  >  Web Front-end  >  What are the categories of objects in JavaScript?

What are the categories of objects in JavaScript?

王林
王林forward
2021-05-03 12:57:416246browse

What are the categories of objects in JavaScript?

Objects in JavaScript can be divided into three major categories, namely internal objects (local objects and built-in objects), host objects and custom objects.

1. Internal objects

1. Local objects, objects provided by ECMAScript that need to be instantiated (new) before they can be used:

Object, Function, Array, String, Boolean , Number, Date, RegExp, Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError

2. Built-in objects, objects provided by ECMAScript that can be used without instantiation:

Only Global (global object) and Math

2. Host object

are objects provided by the browser. All BOM and DOM are host objects.

3. Custom objects

Objects defined by developers themselves

Related recommendations: javascript video tutorial

The above is the detailed content of What are the categories of objects in JavaScript?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete