Im trying to access a method outside of the constructor by using this
for example:
var Garage = function(location){
this.someRandomMethod = function(){
alert("I am a method");
}
// car object
var Car = function(make,model){
this.model = model;
this.make = make;
var accessRandom = function(){
this.someRandomMethod(); // the problem!
}
}
}
But I am getting function is not defined on the console.