Update isArrayLike.md
This commit is contained in:
@ -5,7 +5,7 @@ Checks if the provided argument is array-like (i.e. is iterable).
|
|||||||
Use `Array.from()` and a `try... catch` block to check if the provided argument is array-like.
|
Use `Array.from()` and a `try... catch` block to check if the provided argument is array-like.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const arr = (arr) => {
|
const isArrayLike = arr => {
|
||||||
try{
|
try{
|
||||||
Array.from(arr);
|
Array.from(arr);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user