i want to remove the first array element, without modified the original (immutable),
something like this:
function getArray(): number[] {
return [1, 2, 3, 4, 5];
}
function getAnother(): number[] {
const [first, ...rest] = getArray();
return rest;
}
the code works, but the typescript check complained:
'first' is assigned a value but never used @typescript-eslint/no-unused-vars
Is there the elegant/better way to do somilar to getAnother()?
arr.slice(1)?