mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-26 23:23:55 +00:00
Fixes output on combining strings and operators
This commit is contained in:
parent
1ae02fc6cf
commit
a875e6d589
@ -109,7 +109,7 @@ placeholder = 'use string interpolation'
|
||||
'hello ' + 3.to_s #=> "hello 3"
|
||||
|
||||
# Combine strings and operators
|
||||
'hello ' * 3 #=> "hello hello hello"
|
||||
'hello ' * 3 #=> "hello hello hello "
|
||||
|
||||
# Append to string
|
||||
'hello' << ' world' #=> "hello world"
|
||||
|
Loading…
Reference in New Issue
Block a user