Cognizant Interview Question

js array methods