Multiple choice technology programming languages


var patt1 = new RegExp(/e/g);
 alert(patt1.exec("This is an Example"));   

  1. e

  2. E

  3. error

  4. 16

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The regular expression /e/g matches the lowercase letter e. In "This is an Example", the lowercase e is at the end of the word Example. The exec() method returns an array containing the matched character "e", which alerts as "e".