Push Function into Array

Push Function into Array then loop through the array to fire the functions.

JavaScript

var myArr = ['A','B'];
var a = myArr;


//Function to loop through array and fire functions within the array
function runIt () {
    var myArr = ['A','B'];
var a = myArr;
 myArr=[];
 alert(a);
};

runIt();