Functions are first-class objects, just like any other object, so can be assigned to an object - this is normally referred to as making them a 'method of an object', so there is no need for the ".execute" bit: you just do: last_test();
That depends on how you _want_ to handle them - for more info have a look at reference material firstly for: "function literal format" and then for "closures"
You can either pass the function parameters when you define the function, or when you call it.
You may want to consider a half-way house, where you do:
object.methodName = myFunction;
object.parameters = myParamList;
That way you get use the function repeatedly, but change the parameters when you need.
Bookmarks