Simpan catatan nomor yang digulung dalam array javascript

let colors = ['green', 'yellow', 'blue', 'purple'];
colors.splice(3);
console.log(colors); // ["green", "yellow", "blue"]
// deletes ['purple']
Winard Lamola