Travis build: 483
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
# 30 seconds of code
|
||||
|
||||
[](https://github.com/Chalarangelo/30-seconds-of-code/blob/master/LICENSE) [](https://www.npmjs.com/package/30-seconds-of-code) [](https://www.npmjs.com/package/30-seconds-of-code) [](https://gitter.im/30-seconds-of-code/Lobby) [](http://makeapullrequest.com) [](https://travis-ci.com/Chalarangelo/30-seconds-of-code) [](https://www.codacy.com/app/Chalarangelo/30-seconds-of-code?utm_source=github.com&utm_medium=referral&utm_content=Chalarangelo/30-seconds-of-code&utm_campaign=badger) [](https://codeclimate.com/github/Chalarangelo/30-seconds-of-code/maintainability) [](https://insight.io/github.com/Chalarangelo/30-seconds-of-code/tree/master/?source=0) [](https://github.com/Flet/semistandard) [](https://snyk.io/test/github/Chalarangelo/30-seconds-of-code?targetFile=package.json) [](https://www.producthunt.com/posts/30-seconds-of-code)
|
||||
[](https://github.com/30-seconds/30-seconds-of-code/blob/master/LICENSE) [](https://www.npmjs.com/package/30-seconds-of-code) [](https://www.npmjs.com/package/30-seconds-of-code) [](https://gitter.im/30-seconds-of-code/Lobby) [](http://makeapullrequest.com) [](https://travis-ci.com/30-seconds/30-seconds-of-code) [](https://www.codacy.com/app/30-seconds/30-seconds-of-code?utm_source=github.com&utm_medium=referral&utm_content=30-seconds/30-seconds-of-code&utm_campaign=badger) [](https://codeclimate.com/github/30-seconds/30-seconds-of-code/maintainability) [](https://github.com/Flet/semistandard) [](https://snyk.io/test/github/30-seconds/30-seconds-of-code?targetFile=package.json) [](https://www.producthunt.com/posts/30-seconds-of-code)
|
||||
|
||||
|
||||
> Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.
|
||||
@ -2328,7 +2328,7 @@ sample([3, 7, 9, 11]); // 9
|
||||
|
||||
Gets `n` random elements at unique keys from `array` up to the size of `array`.
|
||||
|
||||
Shuffle the array using the [Fisher-Yates algorithm](https://github.com/chalarangelo/30-seconds-of-code#shuffle).
|
||||
Shuffle the array using the [Fisher-Yates algorithm](https://github.com/30-seconds/30-seconds-of-code#shuffle).
|
||||
Use `Array.slice()` to get the first `n` elements.
|
||||
Omit the second argument, `n` to get only one element at random from the array.
|
||||
|
||||
@ -2359,7 +2359,7 @@ sampleSize([1, 2, 3], 4); // [2,3,1]
|
||||
|
||||
Randomizes the order of the values of an array, returning a new array.
|
||||
|
||||
Uses the [Fisher-Yates algorithm](https://github.com/chalarangelo/30-seconds-of-code#shuffle) to reorder the elements of the array.
|
||||
Uses the [Fisher-Yates algorithm](https://github.com/30-seconds/30-seconds-of-code#shuffle) to reorder the elements of the array.
|
||||
|
||||
```js
|
||||
const shuffle = ([...arr]) => {
|
||||
|
||||
Reference in New Issue
Block a user