how find last item in collection in node js code example Example: find last element in array nodejs var a = loc_array.slice(-1)[0]