Array hanya memotong 5 elemen terakhir
arr.slice(Math.max(arr.length - 5, 0))
Condemned Camel
arr.slice(Math.max(arr.length - 5, 0))