I have an array of objects:
var cmds = [ { ..., execute: function(args) { ... } }, { ..., execute: function(args) { ...