How to call functions inside javascript loop?

    var functions = [];
    var invitees = ["test1@mohitsharma.net', "test2@mohitsharma.net", "test3@mohitsharma.net"];
    for (var i in invitees) {
                 var email = invitees[i];
                 functions.push(function(email) {return function() {
                    // do changes with email here
                  }; }(email));
    }

    // Execute function array according to your requirement or instead of pushing function to array you can call them directly
    5
    Average: 5 (1 vote)