I have:
Main.children.firstfunction.isEnabled = true;
Main.children.second.isEnabled = true;
Main.children.gsdfgsg.isEnabled = true;
Main.children.other.isEnabled = true;
All of these is working good, but such calls is a lot of, so I have in array:
var names = ['firstfunction', 'second', 'gsdfgsg', 'other'];
And I would like do:
for (var name in names) {
Main.children.name.isEnabled = true;
}
But of course it does not work. How can I improve it?