Am I misunderstanding split and/or slice?

I’m trying to remove the first and last character from a string.
I have converted it to an array using split – arr= str.split(" ") --, but when I tried to remove the first and last using slice – newArr = arr.slice(0,-1) – the console only returned empty brackets. This should work. I don’t why I’m returning empty brackets. Am I missing something on split or misunderstanding slice? I don’t think that I am.

Help please.

If you want to separate each character of the string you shouldn’t be using " " (a space) as character to separate on, if you use a space than split will use the space as where to split

Try with an empty string instead

About slice, remember that you put in there the first index (included) and the last index (not included) of the elements you want to copy