04. Built-in Objects

There are three types of built-in-objects in JavaScript. These three groups of objects are used to create the interactivity of a web page.

  1. Global JavaScript Objects
  2. Browser Object Model
  3. Document Object Mode

Global JavaScript Objects

Global JavaScript Objects are objects that allow for different functionalities. Examples include String, Number and Boolean (which we have seen before) and Date, Math and Regex. These basic objects provide basic building blocks for developing interactive websites.

Thus, we may call on object methods such as Math.PI() to access π, or Date.getDate() to access the current date.

Browser Object Model

The Browser Object Model provides a model for the current tab or window. It also acts to contain a number of other objects that are all related to the current browser window.

Examples of some of the parameters one can access through this model include the URL of the current page, information about the user's browsers and the screen width and height.

Document Object Model

The Document Object Model (DOM) is actually part of the Browser Object Model, but due to its expansive and importance, it deserves its own section.

In short, this object gives developers an access point to the HTML elements of the current web page. Thus, to access properties and attributes specific components of the page (such as selecting a specific element with document.getElementById('example')), we may use the DOM.

Build modern and responsive webpages

The Modern Web

Build modern and responsive webpages Try Front-end

The Modern Web will guide you through the most important tools of device-agnostic web development, including HTML5, CSS3, and JavaScript. The plain-english explanations and practical examples emphasize the techniques, principles, and practices that you'll need to easily transcend individual browser quirks and stay relevant as these technologies are updated.

$ Check price
34.9534.95Amazon 4.5 logo(30+ reviews)

More Front-end resources

Aching back from coding all day?

Inversion Therapy Table

Aching back from coding all day? Try Back Problems

Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.

$$ Check price
119.98119.98Amazon 4.5 logo(1,700+ reviews)

More Back Problems resources