I have written some code I found in a video, and it looks something like this:
var clientX = clientX || {} ; 
clientX.MyClass = function(initialValue){
  var var1 = initialValue;
  var publicMembers = {
    get_var1 : function(){
      return var1; 
    }
  };
  return publicMembers;
}
var result = new clientX.MyClass("val1");
alert(result.get_var1());
clientX.instance = new  clientX.MyClass("val2");
alert(clientX.instance.get_var1());
clientX.instance2= new clientX.MyClass("val3");
alert(clientX.instance2.get_var1());
The thing is, after deleting the "new" keyword when I use : var result = new clientX.MyClass("val1"); Nothing is changed, so why the author chose to use it? What's the effect? 
 
     
    