I have JavaScript function as object:
function hexMesh(){
     var side=25;
     console.log('hexMesh');
     function drawOver(){
     }
}  
As you can see it has a function call drawOver. 
I try to call it by using a constructor as follows:
window.onload = function() {
    hexMeshObj=new hexMesh();
    hexMeshObj.drawOver();
}
But it gives me error saying undefined is not a function
Now I know I could declare the function in the prototype of the object but I don't want to do that.
Here it is on JSFiddle.
 
     
    