0
Does " and ' have any difference?
When are you supposed to use ' and " ?
1 ответ
+ 2
In Ruby yes, they have few important differences; double quotes ( " ) allows...
- 'string interpolation':
my_var = 'SoloLearn';
puts "Enjoy #{my_var}!"
- 'escape sequence':
puts 'Enjoy\nSololearn' # print exactly 'Enjoy\nSololearn' at once line
puts "Enjoy\nSololearn" # print 'Enjoy', and next 'Sololearn' at new line