var myObj=new theObj(‘Smedley’);
The object above has no methods yet, but we could define one on its prototype (see my post here), as follows:
console.log(“My name is “+this.name+”.”);
Now, we can invoke the tellAboutMe method on myObj:
Then we should receive the output My name is Smedley.
Source:Oracle Tutoring by Jack and Diane, Campbell River, BC.