Js Remove Last N Elements From Opposite