Array of functions

//This is an example showing an array of functions

by Terrance Smith

HTML

<form >
    <input type="button" id="test" onclick="Start();" value="exectue function test">
</form>

JavaScript

//This is an example showing an array of functions
function Start() {
    debugger;
    var funcArray = {
        actions: []
    };

    funcArray.actions.push(function() {
        alert("item1");
    });

    funcArray.actions.push(function() {
        alert("item2");
    });

    funcArray.actions.push(function() {
        alert("item3");
    });
    
    var funcsCount = funcArray.actions.length;
    
    for (var i = 0; i < funcsCount; i++) {
        funcArray.actions[i].apply();
    }
}