This is probably what you want:
Javeline.Application=new Application();
//....
function Application()
{
this.create = function()
{
Javeline.Application=this;
alert(Javeline.Application);
}
}
Just calling Application
will return undefined
, since the function doesn't have a return statement. Calling it with the new
keyword will give you a new object. However, to add the function create
as a property to this new object, you have to declare it as a property of this
inside of create
.