Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js detect end of array

var group = ["a","b","c","d"];
var groupLength = group.length;

while (groupLength--) {
    var item = group[groupLength];

    if(groupLength == 0){
        console.log("Last iteration with item : " + item);
    }
}
Source by ourcodeworld.com #
 
PREVIOUS NEXT
Tagged: #js #detect #array
ADD COMMENT
Topic
Name
1+9 =