Is there a quick (short, character wise) way to get the last element of an array (assuming the array is non-empty)?
I usually do:
last = array[array.length-1] or last = array[-1..][0]
last = array[array.length-1]
last = array[-1..][0]