String Flashcards
1
Q
scan
A
.scan returns an array with all the items that match the argument given:
“fava”.scan(“a”)
=> [“a”, “a”]
2
Q
chop
A
Removes last character from string
scan
.scan returns an array with all the items that match the argument given:
“fava”.scan(“a”)
=> [“a”, “a”]
chop
Removes last character from string