Added linting, processed current snippets

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

View File

@ -5,6 +5,6 @@ Count and return the number of `1`s in the string, using `match(/1/g)`.
```js
const hammingDistance = (num1, num2) =>
((num1^num2).toString(2).match(/1/g) || '').length;
((num1 ^ num2).toString(2).match(/1/g) || '').length;
// hammingDistance(2,3) -> 1
```