JS menghapus elemen pertama dan terakhir dari array
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);