This directive tells JavaScript that we are about to create a new instance of an object and to allocate memory space for it. JavaScript is smart enought to realize this and creates the new property 'secondmajor' for student1. It will have no effect on student2 or any new instances of the student object. It is also possible to have objects as properites of objects. Lets create a new object to hold multiple student grades.
Objects can also have methods.
Methods are essentially functions that are associated with an object. To add a method to an object you must first define the method function. In our example, lets create a method to display the student's name and their three test scores.