How can I store functions in an array with named properties, so I can call like
FunctionArray["DoThis"]
or even
Function
You can store things directly in an array, but as an object, for example:
var Functions = { DoThis: function() { alert("do this"); } }; Functions['DoThis'](); //alerts "do this" Functions.DoThis() //alerts "do this"
You can give it a try here.