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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.