fix: reduced additional test case to only 1 with zeroArray(4,3) and added to all languages
This commit is contained in:
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
應將 `zeroArray(4,3)` 設置爲 4 行 3 列“零”的二維數組。
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
应将 `zeroArray(4,3)` 设置为 4 行 3 列“零”的二维数组。
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
@ -38,24 +38,10 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Your code should set the `matrix1` variable to an array holding 4 rows of 3 columns of zeroes each.
|
||||
Your code should set `zeroArray(4,3)` to return an array holding 4 rows of 3 columns of zeroes each.
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(matrix1) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
The `matrix1` variable should have 4 rows.
|
||||
|
||||
```js
|
||||
assert(matrix1.length == 4);
|
||||
```
|
||||
|
||||
The `matrix1` variable should have 3 columns in each row.
|
||||
|
||||
```js
|
||||
assert(
|
||||
matrix1[0].length == 3 && matrix1[1].length === 3 && matrix1[2].length === 3 && matrix1[3].length === 3
|
||||
);
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -83,8 +69,6 @@ function zeroArray(m, n) {
|
||||
let matrix = zeroArray(3, 2);
|
||||
console.log(matrix);
|
||||
|
||||
let matrix1 = zeroArray(4, 3);
|
||||
console.log(matrix1);
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
@ -110,6 +94,4 @@ function zeroArray(m, n) {
|
||||
let matrix = zeroArray(3, 2);
|
||||
console.log(matrix);
|
||||
|
||||
let matrix1 = zeroArray(4, 3);
|
||||
console.log(matrix1);
|
||||
```
|
||||
|
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Tu código debe establecer `zeroArray(4,3)` en una matriz que contenga 4 filas de 3 columnas de ceros cada una.
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Il tuo codice dovrebbe impostare la variabile `zeroArray(4,3)` su un array contenente 4 righe di 3 colonne di zeri ciascuna.
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
@ -38,6 +38,12 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
O código deve definir `zeroArray(4,3)` para um array contendo 4 linhas de 3 colunas de zeros.
|
||||
|
||||
```js
|
||||
assert(JSON.stringify(zeroArray(4,3)) == '[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
Reference in New Issue
Block a user