mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-12 01:34:19 +02:00
Fixes output on combining strings and operators
This commit is contained in:
@@ -109,7 +109,7 @@ placeholder = 'use string interpolation'
|
|||||||
'hello ' + 3.to_s #=> "hello 3"
|
'hello ' + 3.to_s #=> "hello 3"
|
||||||
|
|
||||||
# Combine strings and operators
|
# Combine strings and operators
|
||||||
'hello ' * 3 #=> "hello hello hello"
|
'hello ' * 3 #=> "hello hello hello "
|
||||||
|
|
||||||
# Append to string
|
# Append to string
|
||||||
'hello' << ' world' #=> "hello world"
|
'hello' << ' world' #=> "hello world"
|
||||||
|
Reference in New Issue
Block a user