JS usuwają pierwszy i ostatni element z tablicy
a = [1,2,3,4]
b = a.slice(1,-1);
just-saved-you-a-stackoverflow-visit
a = [1,2,3,4]
b = a.slice(1,-1);
// best implementation
const removeChar = (str) => str.slice(1, -1);