I'm using range.getValues() to load an array in Google Apps Script. I want to loop through the array and do something if the array includes the value I'm looking for.
if (array.include("abc")){*doSomething*}
The problem is when I use this method, the array contain another arrays, so array.include() doesn't work. I can use a workaround like this:
for (var i = 0; i<=array.length; i++){
if (array[i] == "abc"){*doSomething*}
I wonder are there a better way to do it? I tried to use array.indexOf() but it returns -1 for 0th value, which is weird

