Using push, pop, shift, unshift, splice, sort, reverse in JS