javascript get all array elements except last

Solutions on MaxInterview for javascript get all array elements except last by the best coders in the world