Creating Our Own Objects in JavaScript
The Object Constructor
The standard way to create an "object type" is to use an object constructor function. This allows us to create a single object. Once you have an object constructor, you can use the new keyword to create new objects of the same type.
This keyword refers to the current object and it is not a variable.
Syntax:-
function my_object_func(parameter_1){
this.parameter_1 = parameter_1;
}
var my_new_object = new my_object_func("cartoon");
document.write(my_new_object.parameter_1);