title: Execute function multiple times replacing part of argument sequentially
body: <p>I have a method (exampleObj.method) that takes arguments of an object and a function. This is shown below:</p>
  
  <pre><code>exampleObj.method({
          name1: 'string1',
          name2: 'string2',
          name3: 'string3',
          name4: {
              array1: ['item1a', 'item1b', 'item1c'],
              array2: ['item2a']
          },
          name5: exampleObj.method2
      },
      function exampleFunc(arg1, arg2) {
          // function logic here
      }
  };
  </code></pre>
  
  <p>What I want to achieve is to execute the method multiple times, each time replacing array1 with a different array from the arrayCollection variable in sequence.</p>
  
  <pre><code>var arrayCollection = [
      ['item1d', 'item1e', 'item1f'],
      ['item1g', 'item1h', 'item1i'],
      ['item1j', 'item1k', 'item1l']
  ];
  </code></pre>
  
  <p>I know that I could iterate through the arrayCollection array executing the method each time or perhaps use forEach to achieve the same. What I am struggling with is replacing the value of array1 each time the method is executed.</p>
  
  <p>When I've searched for an answer it seems as if array.map may be an option. I'm not sure how to use this to change the specific array1 value though.</p>
  
  <p>Any suggestions would be much appreciated!</p>