Amdocs interview question

Basics from the javascript & coding ques on array methods.