Quiz on Advanced Topics

Take a quiz on some concepts in this chapter.

1

What’s the output of the following code snippet?

text = "John is a quick boy running along the field."

p text.scan(/\b[ABJRabjr][a-z]+\b/)
A)

[“John”, “boy”, “running”, “along”]

B)

["John", "a", "boy", "running", "along"]

C)

["John"]

D)

[“John”, “boy”, “along”]

Question 1 of 50 attempted