1var group = ["a","b","c","d"];
2var groupLength = group.length;
3
4for(var i = 0;i < groupLength;i++){
5    var item = group[i];
6
7    // Do something if is the last iteration of the array
8    if((i + 1) == (groupLength)){
9        console.log("Last iteration with item : " + item);
10    }
11}