Skip to content

Commit c9c4463

Browse files
committed
Merge branch 'master' of github.com:mgechev/javascript-algorithms
2 parents 5ec5a9b + d1bd61e commit c9c4463

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ If the build is not successful fix your code in order the tests and jshint valid
8383
:---: |:---: |:---: |:---: |:---: |:---: |
8484
[pkerpedjiev](https://github.com/pkerpedjiev) |[Xuefeng-Zhu](https://github.com/Xuefeng-Zhu) |[mik-laj](https://github.com/mik-laj) |[amilajack](https://github.com/amilajack) |[ysharplanguage](https://github.com/ysharplanguage) |[contra](https://github.com/contra) |
8585

86-
[<img alt="liesislukas" src="https://avatars0.githubusercontent.com/u/2733862?v=3&s=117" width="117">](https://github.com/liesislukas) |[<img alt="millerrach" src="https://avatars1.githubusercontent.com/u/12432794?v=3&s=117" width="117">](https://github.com/millerrach) |[<img alt="fanixk" src="https://avatars1.githubusercontent.com/u/921156?v=3&s=117" width="117">](https://github.com/fanixk) |[<img alt="shaunak1111" src="https://avatars0.githubusercontent.com/u/1323960?v=3&s=117" width="117">](https://github.com/shaunak1111) |
87-
:---: |:---: |:---: |:---: |
88-
[liesislukas](https://github.com/liesislukas) |[millerrach](https://github.com/millerrach) |[fanixk](https://github.com/fanixk) |[shaunak1111](https://github.com/shaunak1111) |
86+
[<img alt="liesislukas" src="https://avatars0.githubusercontent.com/u/2733862?v=3&s=117" width="117">](https://github.com/liesislukas) |[<img alt="millerrach" src="https://avatars1.githubusercontent.com/u/12432794?v=3&s=117" width="117">](https://github.com/millerrach) |[<img alt="fanixk" src="https://avatars1.githubusercontent.com/u/921156?v=3&s=117" width="117">](https://github.com/fanixk) |[<img alt="shaunak1111" src="https://avatars0.githubusercontent.com/u/1323960?v=3&s=117" width="117">](https://github.com/shaunak1111)|[<img alt="kdamball" src="https://avatars0.githubusercontent.com/u/3318312?v=3&s=117" width="117">](https://github.com/kdamball) |
87+
:---: |:---: |:---: |:---: |:---: |
88+
[liesislukas](https://github.com/liesislukas) |[millerrach](https://github.com/millerrach) |[fanixk](https://github.com/fanixk) |[shaunak1111](https://github.com/shaunak1111) |[kdamball](https://github.com/kdamball) |
8989

9090
## License
9191

src/shuffle/fisheryates.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@
2020
function shuffle(array) {
2121
var size = array.length;
2222
var rand;
23-
var temp;
2423
for (var i = 0; i < size; i += 1) {
2524
rand = Math.floor(i + Math.random() * (size - i));
26-
temp = array[rand];
27-
array[rand] = array[i];
28-
array[i] = temp;
25+
[array[rand], array[i]] = [array[i], array[rand]];
2926
}
3027
return array;
3128
}

0 commit comments

Comments
 (0)