TOC
Built-in objects:

Introduction

The JavaScript programming language comes with a range of built-in objects. Some of them have already been quickly mentioned in other articles, like the Number object when we talked about working with numbers in JavaScript.

In the previous chapter, we talked about data types, sometimes also referred to as primitive types. JavaScript is a bit unlike other programming languages in this regard, because it combines primitive types like number with a supporting object called Number. In other programming languages, an array is considered a primitive data type, but in JavaScript, it comes only as a built-in object.

In practice, none of this makes a huge difference, but it sometimes makes it a bit more confusing to work with JavaScript, especially if you have experience from a more strict/traditional programming language.

Summary

In JavaScript, there are both primitive data types as well as complex ones like objects. While we can define our own objects and classes, as we'll see later in this tutorial, JavaScript also comes with quite a lot of built-in objects, and we'll discuss (some of) them in this chapter. We'll talk about the ones that are totally essential, like the Array object, but also about the ones which are just plain useful in a lot of situations, like the Math object.

Please notice that we won't cover ALL built-in objects in this chapter, because there are quite a few, as you can see from this list. Instead, we'll focus on the most important and interesting ones, and the rest you'll have to discover on your own. Also, some built-in objects, like the RegExp object, has so much options and possibilities that we have created an entire chapter dedicated to it. Find it elsewhere in this tutorial.