Reword size snippet
This commit is contained in:
@ -3,7 +3,7 @@ title: size
|
|||||||
tags: object,array,string,intermediate
|
tags: object,array,string,intermediate
|
||||||
---
|
---
|
||||||
|
|
||||||
Get size of arrays, objects or strings.
|
Gets the size of an array, object or string.
|
||||||
|
|
||||||
Get type of `val` (`array`, `object` or `string`).
|
Get type of `val` (`array`, `object` or `string`).
|
||||||
Use `length` property for arrays.
|
Use `length` property for arrays.
|
||||||
@ -27,4 +27,4 @@ const size = val =>
|
|||||||
size([1, 2, 3, 4, 5]); // 5
|
size([1, 2, 3, 4, 5]); // 5
|
||||||
size('size'); // 4
|
size('size'); // 4
|
||||||
size({ one: 1, two: 2, three: 3 }); // 3
|
size({ one: 1, two: 2, three: 3 }); // 3
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user