Sauce Labs interview question

Had a coding challenge on Prototypes, Array functions, closures and scope