chore(i18n,learn): processed translations (#45001)

This commit is contained in:
camperbot
2022-02-04 00:46:32 +05:30
committed by GitHub
parent 0d36c35207
commit f38d19132d
32 changed files with 374 additions and 354 deletions

View File

@ -45,6 +45,18 @@ assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [
]);
```
`uniteUnique([1, 3, 2], [5, 4], [5, 6])` should return `[1, 3, 2, 5, 4, 6]`.
```js
assert.deepEqual(uniteUnique([1, 3, 2], [5, 4], [5, 6]), [1, 3, 2, 5, 4, 6]);
```
`uniteUnique([1, 3, 2, 3], [5, 2, 1, 4], [2, 1])` should return `[1, 3, 2, 5, 4]`.
```js
assert.deepEqual(uniteUnique([1, 3, 2, 3], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4]);
```
# --seed--
## --seed-contents--
@ -62,7 +74,11 @@ uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
```js
function uniteUnique(arr) {
return [].slice.call(arguments).reduce(function(a, b) {
return [].concat(a, b.filter(function(e) {return a.indexOf(e) === -1;}));
return [].concat(
a,
b.filter(function(e, currentIndex) {
return b.indexOf(e) === currentIndex && a.indexOf(e) === -1;
}));
}, []);
}
```