update snippets 0-All
This commit is contained in:
committed by
Agamemnon Zorbas
parent
6bedb8fba4
commit
0c129cdd02
@ -7,5 +7,8 @@ This method also works with strings.
|
||||
|
||||
```js
|
||||
const sample = arr => arr[Math.floor(Math.random() * arr.length)];
|
||||
// sample([3, 7, 9, 11]) -> 9
|
||||
```
|
||||
|
||||
```js
|
||||
sample([3, 7, 9, 11]) -> 9
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user