Added linting, processed current snippets

This commit is contained in:
Angelos Chalaris
2017-12-14 00:05:44 +02:00
parent f6426792d3
commit 143c024968
35 changed files with 2079 additions and 76 deletions

View File

@ -6,7 +6,7 @@ Use `Array.sort()` to sort the elements of the original array based on the rando
```js
const shuffle = arr => {
let r = arr.map(Math.random);
return arr.sort((a,b) => r[a] - r[b]);
}
return arr.sort((a, b) => r[a] - r[b]);
};
// shuffle([1,2,3]) -> [2, 1, 3]
```