0
Can anyone explain what the second g represent in this
let str= “good” Alert(str.match(/g/g).lenght)
1 Answer
+ 1
just found the answer g modifier is used to perform search globaly if we dun use “g “it will return only the first match
let str= “good” Alert(str.match(/g/g).lenght)