Multiple choice technology programming languages


var str = "This is an Example";
  alert(str.match("example"));      

  1. null

  2. Example

  3. example

  4. error

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

The match() method is case-sensitive by default. 'example' (all lowercase) does not match 'Example' (with capital E) in the string, so match() returns null. For case-insensitive matching, you would need a regex with the 'i' flag.