Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get last item in map javascript

row.map((rank, i, arr) => {
    if (arr.length - 1 === i) {
        // last one
    } else {
        // not last one
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #item #map #javascript
ADD COMMENT
Topic
Name
8+3 =