Good day, turned up such a task to move the element of the array to the beginning. It seems to have done, but can there be a more beautiful way to move an element to the beginning?
var arr = [0, 1, 2, 3, 4, 5]; console.log(arr); var removed = arr.splice(3, 1); arr.unshift(removed[0]); console.log(arr);