All built in javascript objects

Standard built-in objects

This chapter documents all of JavaScript’s standard, built-in objects, including their methods and properties.

The term «global objects» (or standard built-in objects) here is not to be confused with the global object. Here, global objects refer to objects in the global scope. The global object itself can be accessed using the this operator in the global scope (but only if ECMAScript 5 strict mode is not used; in that case it returns undefined ). In fact, the global scope consists of the properties of the global object, including inherited properties, if any.

Other objects in the global scope are either created by the user script or provided by the host application. The host objects available in browser contexts are documented in the API reference. For more information about the distinction between the DOM and core JavaScript, see JavaScript technologies overview.

Standard objects by category

Value properties

These global properties return a simple value; they have no properties or methods.

Function properties

These global functions—functions which are called globally rather than on an object—directly return their results to the caller.

Читайте также:  Server downloading php files

Fundamental objects

These are the fundamental, basic objects upon which all other objects are based. This includes objects that represent general objects, functions, and errors.

Numbers and dates

These are the base objects representing numbers, dates, and mathematical calculations.

Text processing

These objects represent strings and support manipulating them.

Indexed collections

These objects represent collections of data which are ordered by an index value. This includes (typed) arrays and array-like constructs.

Keyed collections

These objects represent collections which use keys; these contain elements which are iterable in the order of insertion.

Vector collections

SIMD vector data types are objects where data is arranged into lanes.

Structured data

These objects represent and interact with structured data buffers and data coded using JavaScript Object Notation (JSON).

Control abstraction objects

Reflection

Internationalization

Additions to the ECMAScript core for language-sensitive functionalities.

WebAssembly

Non-standard objects

Other

Document Tags and Contributors

  1. JavaScript
  2. Tutorials:
  3. Complete beginners
    1. JavaScript basics
    2. JavaScript first steps
    3. JavaScript building blocks
    4. Introducing JavaScript objects
    1. Introduction
    2. Grammar and types
    3. Control flow and error handling
    4. Loops and iteration
    5. Functions
    6. Expressions and operators
    7. Numbers and dates
    8. Text formatting
    9. Regular expressions
    10. Indexed collections
    11. Keyed collections
    12. Working with objects
    13. Details of the object model
    14. Iterators and generators
    15. Meta programming
    1. A re-introduction to JavaScript
    2. JavaScript data structures
    3. Equality comparisons and sameness
    4. Closures
    1. Inheritance and the prototype chain
    2. Strict mode
    3. JavaScript typed arrays
    4. SIMD types
    5. Memory Management
    6. Concurrency model and Event Loop
    1. Array
    2. ArrayBuffer
    3. AsyncFunction
    4. Atomics
    5. Boolean
    6. DataView
    7. Date
    8. Error
    9. EvalError
    10. Float32Array
    11. Float64Array
    12. Function
    13. Generator
    14. GeneratorFunction
    15. Infinity
    16. Int16Array
    17. Int32Array
    18. Int8Array
    19. InternalError
    20. Intl
    21. Intl.Collator
    22. Intl.DateTimeFormat
    23. Intl.NumberFormat
    24. Iterator
    25. JSON
    26. Map
    27. Math
    28. NaN
    29. Number
    30. Object
    31. ParallelArray
    32. Promise
    33. Proxy
    34. RangeError
    35. ReferenceError
    36. Reflect
    37. RegExp
    38. SIMD
    39. SIMD.Bool16x8
    40. SIMD.Bool32x4
    41. SIMD.Bool64x2
    42. SIMD.Bool8x16
    43. SIMD.Float32x4
    44. SIMD.Float64x2
    45. SIMD.Int16x8
    46. SIMD.Int32x4
    47. SIMD.Int8x16
    48. SIMD.Uint16x8
    49. SIMD.Uint32x4
    50. SIMD.Uint8x16
    51. Set
    52. SharedArrayBuffer
    53. StopIteration
    54. String
    55. Symbol
    56. SyntaxError
    57. TypeError
    58. TypedArray
    59. URIError
    60. Uint16Array
    61. Uint32Array
    62. Uint8Array
    63. Uint8ClampedArray
    64. WeakMap
    65. WeakSet
    66. WebAssembly
    67. decodeURI()
    68. decodeURIComponent()
    69. encodeURI()
    70. encodeURIComponent()
    71. escape()
    72. eval()
    73. isFinite()
    74. isNaN()
    75. null
    76. parseFloat()
    77. parseInt()
    78. undefined
    79. unescape()
    80. uneval()
    1. Arithmetic operators
    2. Array comprehensions
    3. Assignment operators
    4. Bitwise operators
    5. Comma operator
    6. Comparison operators
    7. Conditional (ternary) Operator
    8. Destructuring assignment
    9. Expression closures
    10. Generator comprehensions
    11. Grouping operator
    12. Legacy generator function expression
    13. Logical Operators
    14. Object initializer
    15. Operator precedence
    16. Property accessors
    17. Spread syntax
    18. async function expression
    19. await
    20. class expression
    21. delete operator
    22. function expression
    23. function* expression
    24. in operator
    25. instanceof
    26. new operator
    27. new.target
    28. super
    29. this
    30. typeof
    31. void operator
    32. yield
    33. yield*
    1. Legacy generator function
    2. async function
    3. block
    4. break
    5. class
    6. const
    7. continue
    8. debugger
    9. default
    10. do. while
    11. empty
    12. export
    13. for
    14. for each. in
    15. for. in
    16. for. of
    17. function declaration
    18. function*
    19. if. else
    20. import
    21. label
    22. let
    23. return
    24. switch
    25. throw
    26. try. catch
    27. var
    28. while
    29. with
    1. Arguments object
    2. Arrow functions
    3. Default parameters
    4. Method definitions
    5. Rest parameters
    6. getter
    7. setter
    1. constructor
    2. extends
    3. static
    1. Error: Permission denied to access property «x»
    2. InternalError: too much recursion
    3. RangeError: argument is not a valid code point
    4. RangeError: invalid array length
    5. RangeError: invalid date
    6. RangeError: precision is out of range
    7. RangeError: radix must be an integer
    8. RangeError: repeat count must be less than infinity
    9. RangeError: repeat count must be non-negative
    10. ReferenceError: «x» is not defined
    11. ReferenceError: assignment to undeclared variable «x»
    12. ReferenceError: can’t access lexical declaration`X’ before initialization
    13. ReferenceError: deprecated caller or arguments usage
    14. ReferenceError: invalid assignment left-hand side
    15. ReferenceError: reference to undefined property «x»
    16. SyntaxError: «0»-prefixed octal literals and octal escape seq. are deprecated
    17. SyntaxError: «use strict» not allowed in function with non-simple parameters
    18. SyntaxError: «x» is a reserved identifier
    19. SyntaxError: JSON.parse: bad parsing
    20. SyntaxError: Malformed formal parameter
    21. SyntaxError: Unexpected token
    22. SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead
    23. SyntaxError: a declaration in the head of a for-of loop can’t have an initializer
    24. SyntaxError: applying the ‘delete’ operator to an unqualified name is deprecated
    25. SyntaxError: for-in loop head declarations may not have initializers
    26. SyntaxError: function statement requires a name
    27. SyntaxError: identifier starts immediately after numeric literal
    28. SyntaxError: illegal character
    29. SyntaxError: invalid regular expression flag «x»
    30. SyntaxError: missing ) after argument list
    31. SyntaxError: missing ) after condition
    32. SyntaxError: missing : after property id
    33. SyntaxError: missing ; before statement
    34. SyntaxError: missing = in const declaration
    35. SyntaxError: missing ] after element list
    36. SyntaxError: missing formal parameter
    37. SyntaxError: missing name after . operator
    38. SyntaxError: missing variable name
    39. SyntaxError: missing > after function body
    40. SyntaxError: missing > after property list
    41. SyntaxError: redeclaration of formal parameter «x»
    42. SyntaxError: return not in function
    43. SyntaxError: test for equality (==) mistyped as assignment (=)?
    44. SyntaxError: unterminated string literal
    45. TypeError: «x» has no properties
    46. TypeError: «x» is (not) «y»
    47. TypeError: «x» is not a constructor
    48. TypeError: «x» is not a function
    49. TypeError: «x» is not a non-null object
    50. TypeError: «x» is read-only
    51. TypeError: More arguments needed
    52. TypeError: can’t access dead object
    53. TypeError: can’t define property «x»: «obj» is not extensible
    54. TypeError: can’t delete non-configurable array element
    55. TypeError: can’t redefine non-configurable property «x»
    56. TypeError: cyclic object value
    57. TypeError: invalid ‘in’ operand «x»
    58. TypeError: invalid Array.prototype.sort argument
    59. TypeError: invalid arguments
    60. TypeError: invalid assignment to const «x»
    61. TypeError: property «x» is non-configurable and can’t be deleted
    62. TypeError: setting getter-only property «x»
    63. TypeError: variable «x» redeclares argument
    64. URIError: malformed URI sequence
    65. Warning: -file- is being assigned a //# sourceMappingURL, but already has one
    66. Warning: 08/09 is not a legal ECMA-262 octal constant
    67. Warning: Date.prototype.toLocaleFormat is deprecated
    68. Warning: JavaScript 1.6’s for-each-in loops are deprecated
    69. Warning: String.x is deprecated; use String.prototype.x instead
    70. Warning: expression closures are deprecated
    71. Warning: unreachable code after return statement
    1. JavaScript technologies overview
    2. Lexical grammar
    3. JavaScript data structures
    4. Enumerability and ownership of properties
    5. Iteration protocols
    6. Strict mode
    7. Transitioning to strict mode
    8. Template literals
    9. Deprecated features
    1. ECMAScript 2015 support in Mozilla
    2. ECMAScript 5 support in Mozilla
    3. ECMAScript Next support in Mozilla
    4. Firefox JavaScript changelog
    5. New in JavaScript 1.1
    6. New in JavaScript 1.2
    7. New in JavaScript 1.3
    8. New in JavaScript 1.4
    9. New in JavaScript 1.5
    10. New in JavaScript 1.6
    11. New in JavaScript 1.7
    12. New in JavaScript 1.8
    13. New in JavaScript 1.8.1
    14. New in JavaScript 1.8.5
    1. All pages index
    2. Methods index
    3. Properties index
    4. Pages tagged «JavaScript»
    1. JavaScript doc status
    2. The MDN project

    Источник

    Standard built-in objects

    This chapter documents all of JavaScript’s standard, built-in objects, including their methods and properties.

    The term «global objects» (or standard built-in objects) here is not to be confused with the global object. Here, «global objects» refer to objects in the global scope.

    The global object itself can be accessed using the this operator in the global scope. In fact, the global scope consists of the properties of the global object, including inherited properties, if any.

    Other objects in the global scope are either created by the user script or provided by the host application. The host objects available in browser contexts are documented in the API reference.

    For more information about the distinction between the DOM and core JavaScript, see JavaScript technologies overview.

    Standard objects by category

    Value properties

    These global properties return a simple value. They have no properties or methods.

    Function properties

    These global functions—functions which are called globally, rather than on an object—directly return their results to the caller.

    • eval()
    • isFinite()
    • isNaN()
    • parseFloat()
    • parseInt()
    • decodeURI()
    • decodeURIComponent()
    • encodeURI()
    • encodeURIComponent()
    • escape() Deprecated
    • unescape() Deprecated

    Fundamental objects

    These objects represent fundamental language constructs.

    Error objects

    Error objects are a special type of fundamental object. They include the basic Error type, as well as several specialized error types.

    Numbers and dates

    These are the base objects representing numbers, dates, and mathematical calculations.

    Text processing

    These objects represent strings and support manipulating them.

    Indexed collections

    These objects represent collections of data which are ordered by an index value. This includes (typed) arrays and array-like constructs.

    Keyed collections

    These objects represent collections which use keys. The iterable collections ( Map and Set ) contain elements which are easily iterated in the order of insertion.

    Structured data

    These objects represent and interact with structured data buffers and data coded using JavaScript Object Notation (JSON).

    Managing memory

    These objects interact with the garbage collection mechanism.

    Control abstraction objects

    Control abstractions can help to structure code, especially async code (without using deeply nested callbacks, for example).

    Reflection

    Internationalization

    Additions to the ECMAScript core for language-sensitive functionalities.

    • Intl
    • Intl.Collator
    • Intl.DateTimeFormat
    • Intl.DisplayNames
    • Intl.DurationFormat
    • Intl.ListFormat
    • Intl.Locale
    • Intl.NumberFormat
    • Intl.PluralRules
    • Intl.RelativeTimeFormat
    • Intl.Segmenter

    Found a content problem with this page?

    This page was last modified on Apr 22, 2023 by MDN contributors.

    Your blueprint for a better internet.

    Источник

Оцените статью