What is the output of this function when called with an empty array ?

Refer to the code below:
Const myFunction = arr => {
Return arr.reduce((result, current) =>{
Return result = current;
}, 10};
}
What is the output of this function when called with an empty array ?
A. Returns 0
B. Throws an error
C. Returns 10
D. Returns NaN

Download Printable PDF. VALID exam to help you PASS.

One thought on “What is the output of this function when called with an empty array ?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.