BeatRoute interview question

Sort Arrays, and create pollyfill of higher order array methods.