Ruby Ruby Basics Strings Escape Sequences

Elizabeth Naves
Elizabeth Naves
39,088 Points

Can somebody please explain why this is wrong?

Bummer! (eval):1: syntax error, unexpected $undefined puts \n ^ (eval):2: syntax error, unexpected $undefined puts \t ^ (eval):3: syntax error, unexpected $undefined puts \" ^ (eval):3: unterminated string meets end of file Restart

puts  \n
puts  \t
puts  \"

2 Answers

Ben Reynolds
Ben Reynolds
35,167 Points

Each of these three special characters works when used inside a string (for this challenge you can use any strings you like for each line)

Edward Rutz
Edward Rutz
9,985 Points

Hi Elizabeth, You are missing a string value after your puts command. After you call "puts" you need to type a string/text like "happy, happy, happy" then add the new line or tab character. The third puts call involves a string that has quotes within quotes. A string is a sequence of characters and is placed within single ('happy') or double quotes ("happy")

Happy coding...Edward