CHAPTER 5

image

JavaScript Global Objects Reference

Since one of the basic features of JavaScript is prototypal inheritance, it has no base classes for things like arrays or strings. Instead, JavaScript has a set of base objects from which other objects of the same type can inherit their properties and methods. These base objects reside in the global scope (which in the browser is the window object) and can thus be accessed at any time.

This chapter provides a reference for the major JavaScript global objects Array, Boolean, Date, Number, RegExp, and String. It also includes documentation for the Math object, which, unlike the other objects, does not ...

Get JavaScript Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.