mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-06 06:47:54 +02:00
Adding strings without + added.
This commit is contained in:
@@ -101,6 +101,8 @@ False or True #=> True
|
|||||||
|
|
||||||
# Strings can be added too! But try not to do this.
|
# Strings can be added too! But try not to do this.
|
||||||
"Hello " + "world!" # => "Hello world!"
|
"Hello " + "world!" # => "Hello world!"
|
||||||
|
# Strings can be added without using '+'
|
||||||
|
"Hello " "world!" # => "Hello world!"
|
||||||
|
|
||||||
# A string can be treated like a list of characters
|
# A string can be treated like a list of characters
|
||||||
"This is a string"[0] # => 'T'
|
"This is a string"[0] # => 'T'
|
||||||
|
Reference in New Issue
Block a user