Confusion about array.length and return statements in JS

So I’m doing this exercise. I know how to solve this problem but I’m confused about how to return two variables in the same return statement and if an array’s length starts at 1 or 0?

Thanks in advance for all advice/help!

Regards
Ma3_str0

If you want to return two things, I believe you have to pass them out in an array.

1 Like

actually you return one array which may consist of several values.

1 Like

Yes, you need to pass them out in an array.