Answers for "js indexof regex"

2

js indexof regex

//regular indexof
let a = 'asbdais sbbdias isajdij';
a.indexOf('ias');
// with regex:
let a = 'asbdais sbbdias isajdij';
a.search(/ias/g);
Posted by: Guest on August-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language