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