We saw that
Objects have properties and methods. For example, an Array object has the length property and the sort() method.
To create a new object, we simply write new ObjectType(). We can choose to initialize an object when we create it.
To set an object's property's value or get that value, we simply write ObjectName.ObjectProperty.
Calling the methods of an object is similar to calling functions. Parameters may be passed, and return values may be passed back. Accessing the methods of an object is identical to accessing a property, except we must remember to add parentheses at the end, even when there are no parameters. For example, we would write ObjectName.ObjectMethod().
The String object provides lots of handy functionality for text and gives us ways of finding out how long the text is, searching for text inside the string, and selecting parts of the text.
The Math object is created automatically and provides a number of mathematical properties and methods. For example, to obtain a random number between 0 and 1, we use the method Math.random().
The Array object provides ways of manipulating arrays. Some of the things we can do are find the length of an array, sort its elements, and join two arrays together.
The Date object provides a way of storing, calculating with, and later accessing dates and times.