mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 15:24:09 +03:00
Merge pull request #573 from trevor/patch-1
WARNING: deprecated syntax "x[i:]".
This commit is contained in:
commit
0e80e9580b
@ -193,7 +193,6 @@ a = [1:5] # => 5-element Int64 Array: [1,2,3,4,5]
|
|||||||
|
|
||||||
# You can look at ranges with slice syntax.
|
# You can look at ranges with slice syntax.
|
||||||
a[1:3] # => [1, 2, 3]
|
a[1:3] # => [1, 2, 3]
|
||||||
a[2:] # => [2, 3, 4, 5]
|
|
||||||
a[2:end] # => [2, 3, 4, 5]
|
a[2:end] # => [2, 3, 4, 5]
|
||||||
|
|
||||||
# Remove elements from an array by index with splice!
|
# Remove elements from an array by index with splice!
|
||||||
|
Loading…
Reference in New Issue
Block a user