Skip to main content
3 of 4
deleted 1 characters in body; added 1 characters in body
Aleadam
  • 40.4k
  • 9
  • 88
  • 108

It's as simple as iterating the array and looking for the regexp

function searchStringInArray (stringArray) { for (var j=0; j<stringArray.length; j++) { if (stringArray[j].match ("height")) return j; } return -1; } 
Aleadam
  • 40.4k
  • 9
  • 88
  • 108