Javascript Array Remove Last Element Of List