Ruby Ruby Basics Strings Escape Sequences

new line character ruby not being accepted as correct answer ruby basics string escape characters

I am entering the answer correctly for ruby basics but its saying it;s wrong.

Challenge Task 1 of 1 Call puts with a string containing a newline character. Then call puts with a string containing a tab character. Finally, call puts a third time with a string containing a " double quotation mark.

MY ANSWER

puts "hello /n hi" puts "hello/t" puts '"hello" he said'

MY ERROR Bummer: For your first call to the "puts" method, the argument needs to contain a newline character.

program.rb
puts "hello   /n hi"
puts "hello/t"
puts '"hello" he said'

1 Answer

Henrik Christensen
Henrik Christensen
35,799 Points

It should be \n and \t instead of /n and /t

Thanks Henrik! :-)