I would like to access a function within an object like this
function MyObject()
{
this.create = function(array)
{
var myArray = array;
this.arrayLength = function(){return myArray.length;}
// Do something else here...
}
}
var foo = new MyObject();
foo.create(value);
console.log(foo.create.arrayLength(););
I get undefined as response for .create.length(), is it even possible to do it that way?