javascript array pick last element code example Example: find last element in array nodejs var a = loc_array.slice(-1)[0]