Is it possible to create a nested method in javaScript like this:
Circle= function (){
this.type1 = function (){
this.property = {
color: "red"
}
}
this.type2 = function (){
this.property = {
color: "blue"
}
}
}
Where it could be accessed this way:
circle = new Circle();
circle.type2.property.color = "red";