docs: document removeAt() return value and update list examples

This commit is contained in:
Bob Nystrom
2015-02-22 18:26:31 +00:00
parent ad7318d101
commit 9016d6e12d
2 changed files with 10 additions and 2 deletions
+4
View File
@@ -37,6 +37,10 @@ are shifted up to fill in where the removed element was.
list.removeAt(1)
IO.print(list) // "[a, c, d]".
Returns the removed item.
IO.print(["a", "b", "c"].removeAt(1) // "b".
It is a runtime error if the index is not an integer or is out of bounds.
### **[**index**]** operator