最佳答案
arr = [1,2,3];
arr.forEach(function(i){
// last iteration
});
How to catch when the loop ending? I can do if(i == 3)
but I might don't know what is the number of my array.