|
|
|
|
|
by weaksauce
56 days ago
|
|
looked into it more and the docs say that an index out of bounds will return nil. also says if offset == size and length >= 0 it will return an empty array. ```
If offset == self.size and size >= 0, returns a new empty array. If size is negative, returns nil.
``` either way if you are doing stuff with arrays and not checking bounds you can throw an `Array(some_array.slice(x, x+100))` and it will always behave. |
|