get last digit in array javascr code example Example: how get last array value in javascipt arr.slice(-1)[0]