Total newbie so apologies if this is a silly question. I'm trying to write a function which takes an array of any length and randomises all the indices, apart from the first and last indices. So basically I want to remove the first and last indices and then shuffle the remaining indices and then reattach the removed indices back in their original place.
for example
var anyArray = ['ONE', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'TEN'];
and return something like
var anyArray = ['ONE', 'six', 'nine', 'four', 'eight', 'two', 'five', 'three', 'seven', 'TEN'];