American Express interview question

How to use JavaScript array methods.