I have an object inside another object:
function TextInput() {
this.east = \"\";
this.west = \"\";
}
TextInput.prototype.eastConnect = function(obje
puts(textInput1.east.name)
This gives an undefined because JS is trying to find an object called name inside east, which does not exist. If you want to pass the name then I think you'll need to do it by passing a string. You can think about creating a property name inside east that may give its name in string. But if there are a lot of objects and you're looking for name of each then you can't go on doing this. Bad OO practice.