Shift In Array Javascript Methods And Functions