Quiz on Strings and Arrays
Test your knowledge of strings and arrays in Ruby.
1
(Select all that apply.) We want to store the following string in the variable msg
. Which option shows the correct syntax in Ruby?
This string has ' and " in it
A)
msg = '''This string has ' and " in it'''
B)
msg = 'This string has ' and " in it'
C)
msg = "This string has ' and " in it"
D)
msg = "This string has \' and \" in it"
Question 1 of 60 attempted