"& Help is available in the Library, ".match(/(i)/)
This should be returning all the matches for "i". Instead it's returning only 2.
Two questions
It should be returning all the matches as that is suggested by mdn
What does index=7 mean in the array(in the picture)
For reference, Here is the definition that found on mdn
(x)
Matches x and remembers the match. These are called capturing groups.For example, /(foo)/ matches and remembers "foo" in "foo bar".
The capturing groups are numbered according to the order of left parentheses of capturing groups, starting from 1. The matched substring can be recalled from the resulting array's elements 1, ..., [n] or from the predefined RegExp object's properties $1, ..., $9.
Capturing groups have a performance penalty. If you don't need the matched substring to be recalled, prefer non-capturing parentheses (see below).