Exercise 11.10.2 D)

Hi guys, I’m stuck on Chapter 11 exercise, part 11.0.2 D) about stealing cargo from the array. Is anyone else stuck on this? I find it frustrating that there aren’t solutions for every part of the exercises.

Right now, I only have this as my code:
let newArray = [];
let veryInnocentVariable = function(arr) {

}

I know I need to use an array method (maybe the map method?) but I’m not sure how to get started. Do I need to be using the existing function holdStatus??

I didn’t use any existing functions. All I did was locate the items I wanted from the cargoHold array using their index & copied them to the newArray while also replacing cargoHold with 2 strings I aptly named “Junk 1” & “Junk 2”.
I only used 1 array method & used it for both items (not at the same time, I couldn’t figure out how).
Then I returned my newArray with my haul!
I am sure you’re overthinking this. It was one of the easiest steps in this exercise. :slight_smile:
Please let me know if you get stuck & I’ll share the method I used.

Thanks @StephNau! Will give this a try.