Excluir o nó do nó do final

let coolThing = [1, 2, 3, 4, 5];
coolThing.splice(-n, 1);
jawwson