mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 10:01:38 +00:00
WARNING: deprecated syntax "x[i:]".
0.3.0-prerelease+2077
This commit is contained in:
parent
f45a71a3bf
commit
464930ecf8
@ -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