ValueLabs Interview Question

I coding question on JS arrays