Answers for "how to extract strings in array js"

0

how to extract strings in array js

function search (array,string) {

    var arr= [];

    for (var i=0; i<array.length; i++) {
        if (array[i].match(string)){

          arr.push(i)

          return arr;
        }  
    }
      return -1;
  }

 search(array,'v_')
Posted by: Guest on October-22-2020

Code answers related to "how to extract strings in array js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language