Usuń węzeł nth od końca

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