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

This commit is contained in:
camperbot
2022-02-16 22:48:09 +05:30
committed by GitHub
parent 51c8b065f5
commit c934590548
48 changed files with 515 additions and 492 deletions

View File

@ -1,6 +1,6 @@
---
id: 595671d4d2cdc305f0d5b36f
title: Hash from two arrays
title: Hash da due array
challengeType: 5
forumTopicId: 302283
dashedName: hash-from-two-arrays
@ -8,53 +8,53 @@ dashedName: hash-from-two-arrays
# --description--
Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the values).
Utilizzando due array di uguale lunghezza, crea un oggetto Hash dove gli elementi di un array (le chiavi) sono collegati agli elementi dell'altro (i valori).
**Related task:**
**Compito correlato:**
<ul>
<li><a href='https://rosettacode.org/wiki/Associative arrays/Creation' title='Associative arrays/Creation' target='_blank'>Associative arrays/Creation</a></li>
<li><a href='https://rosettacode.org/wiki/Associative arrays/Creation' title='Array associativi/Creazione' target='_blank'>Array associativi/Creazione</a></li>
</ul>
# --hints--
`arrToObj` should be a function.
`arrToObj` dovrebbe essere una funzione.
```js
assert(typeof arrToObj === 'function');
```
`arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d", "e"])` should return `{ 1: "a", 2: "b", 3: "c", 4: "d", 5: "e" }`
`arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d", "e"])` dovrebbe restituire `{ 1: "a", 2: "b", 3: "c", 4: "d", 5: "e" }`
```js
assert.deepEqual(arrToObj(...testCases[0]), res[0]);
```
`arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d"])` should return `{ 1: "a", 2: "b", 3: "c", 4: "d", 5: undefined }`
`arrToObj([1, 2, 3, 4, 5], ["a", "b", "c", "d"])` dovrebbe restituire `{ 1: "a", 2: "b", 3: "c", 4: "d", 5: undefined }`
```js
assert.deepEqual(arrToObj(...testCases[1]), res[1]);
```
`arrToObj([1, 2, 3], ["a", "b", "c", "d", "e"])` should return `{ 1: "a", 2: "b", 3: "c" }`
`arrToObj([1, 2, 3], ["a", "b", "c", "d", "e"])` dovrebbe restituire `{ 1: "a", 2: "b", 3: "c" }`
```js
assert.deepEqual(arrToObj(...testCases[2]), res[2]);
```
`arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4, 5])` should return `{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": 5 }`
`arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4, 5])` dovrebbe restituire `{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": 5 }`
```js
assert.deepEqual(arrToObj(...testCases[3]), res[3]);
```
`arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4])` should return `{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": undefined }`
`arrToObj(["a", "b", "c", "d", "e"], [1, 2, 3, 4])` dovrebbe restituire `{ "a": 1, "b": 2, "c": 3 , "d": 4, "e": undefined }`
```js
assert.deepEqual(arrToObj(...testCases[4]), res[4]);
```
`arrToObj(["a", "b", "c"], [1, 2, 3, 4, 5])` should return `{ "a": 1, "b": 2, "c": 3 }`
`arrToObj(["a", "b", "c"], [1, 2, 3, 4, 5])` dovrebbe restituire `{ "a": 1, "b": 2, "c": 3 }`
```js
assert.deepEqual(arrToObj(...testCases[5]), res[5]);