Skip to content

Commit 948ccd9

Browse files
committed
Add note about converting array-like objects to Array
1 parent 32a4a8f commit 948ccd9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@
142142
itemsCopy = items.slice();
143143
```
144144

145+
- To convert an array-like object to an array, use Array#slice.
146+
147+
```javascript
148+
function trigger() {
149+
var args = Array.prototype.slice.call(arguments);
150+
...
151+
}
152+
```
153+
145154
**[[⬆]](#TOC)**
146155

147156

0 commit comments

Comments
 (0)