Array Cut nur letzte 5 Element

arr.slice(Math.max(arr.length - 5, 0))
Condemned Camel