This function is able to search for a string in an array:
public checkElement( array ) {
for(var i = 0 ; i< array.length; i++) {
if( array[i] == 'some_string' ) {
return true;
}
}
}
How can i use array of arrays in the for loop? I want to pass this to a function that search a string with if condition.
Example input:
array[['one','two'],['three','four'],['five','six']].
publicfrom?