I was given an array of nested JS objects with multiple properties. I needed to write a recursive function to loop throw the array to access each object and verify the value and delete the object if the value was negative. But remember that its a nested object, so its not just the outer array you're looping through
Anonymous
I wrote the recursive function but had difficulty with modifying the array because since you're looping through it, if you delete an element, the size of array changes. The interviewer was friendly and gave me few tips. I was able to complete the solution