Question: How would you reference the text 'avenue' in the code shown?

  1. roadTypes.2
  2. roadTypes\[3\]
  3. roadTypes.3
  4. roadTypes\[2\]

Answer: The correct answer of the above question is Option D:roadTypes\[2\]