Nesting for loops to find matches in different tables
I don't know enough about the shape of testData to write great code, but you could preprocess and convert testData from an array to an object or Map of key-value pairs. By using the first element of each item in testData as the key, then you can convert your \$O(n)\$ inner &quot;search&quot; loop into a constant time \$O(1)\$ key lookup. This would reduce your overall complexity from something on the order of \$O(n^2)\$ to a nicer linear \$O(n)\$ algorithm.
Note: This assumes your data has unique values sitting at index 0 of each element in the main array. The difference being your code returns the first match, but the following technically return the last match as duplicate key overwrite existing value(s).
Something like:
var tabData = tabDataRange
  .getValues()
  .reduce((tabData, data) =&gt; ({ ...tabData, [data[0]]: data }), {});

Then your loop becomes
for (var i = 0; i &lt; sheetData.length; i++) {
  var sheetName = sheetData[i];

  if (tabData[sheetName]) {
    var data = tabData[sheetName];
    var tabProps = [
      tabName = data[0],
      tabVisibility = data[3],
      tabUpdVisibility = data[4],
      tabClearData = data[5],
      tabFormat = data[6],
      tabPosition = data[7],
      tabColor = data[8]
    ];
    break; // &lt;-- found data, break out of loop early
  }
  console.log(&quot;tabProps = &quot;, tabProps);
  console.log(&quot;tabName = &quot; + tabName);
}