JavaScript Objects

Javascript Objects are containers for data. Objects are variables that contain many values. The values are written in name:value pairs.

In this example we are accessing the value of a property of an object that was built using a literal contructor:

In this example I created an object using the contructor method, and then use inheritance to instantiate a child of that object. I then used a loop to print all the values of the child object.

We can use methods to make changes to the properties, such as print it in uppercase, print they keys, see the entries of the object and mores:

We can also use forms to gather input and create an object with the data: