Skip to content

Commit

Permalink
chore(i18n,learn): processed translations (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
camperbot authored Jan 6, 2025
1 parent ec3388c commit 7eca12f
Show file tree
Hide file tree
Showing 3,179 changed files with 170,459 additions and 13,253 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,61 @@ Check if a value is classified as a boolean primitive. Return `true` or `false`.
`booWho(true)` 應返回 `true`

```js
assert.strictEqual(booWho(true), true);
assert.isTrue(booWho(true));
```

`booWho(false)` 應該返回 `true`

```js
assert.strictEqual(booWho(false), true);
assert.isTrue(booWho(false));
```

`booWho([1, 2, 3])` 應該返回 `false`

```js
assert.strictEqual(booWho([1, 2, 3]), false);
assert.isFalse(booWho([1, 2, 3]));
```

`booWho([].slice)` 應該返回 `false`

```js
assert.strictEqual(booWho([].slice), false);
assert.isFalse(booWho([].slice));
```

`booWho({ "a": 1 })` 應該返回 `false`

```js
assert.strictEqual(booWho({ a: 1 }), false);
assert.isFalse(booWho({ a: 1 }));
```

`booWho(1)` 應該返回 `false`

```js
assert.strictEqual(booWho(1), false);
assert.isFalse(booWho(1));
```

`booWho(NaN)` 應該返回 `false`

```js
assert.strictEqual(booWho(NaN), false);
assert.isFalse(booWho(NaN));
```

`booWho("a")` 應該返回 `false`

```js
assert.strictEqual(booWho('a'), false);
assert.isFalse(booWho('a'));
```

`booWho("true")` 應該返回 `false`

```js
assert.strictEqual(booWho('true'), false);
assert.isFalse(booWho('true'));
```

`booWho("false")` 應該返回 `false`

```js
assert.strictEqual(booWho('false'), false);
assert.isFalse(booWho('false'));
```

# --seed--
Expand All @@ -90,7 +90,7 @@ booWho(null);

```js
function booWho(bool) {
return typeof bool === "boolean";
return typeof bool === 'boolean';
}

booWho(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function chunkArrayInGroups(arr, size) {
return arr;
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);
chunkArrayInGroups(['a', 'b', 'c', 'd'], 2);
```

# --solutions--
Expand All @@ -106,5 +106,5 @@ function chunkArrayInGroups(arr, size) {
return out;
}

chunkArrayInGroups(["a", "b", "c", "d"], 2);
chunkArrayInGroups(['a', 'b', 'c', 'd'], 2);
```
Original file line number Diff line number Diff line change
Expand Up @@ -10,84 +10,85 @@ dashedName: confirm-the-ending

Check if a string (first argument, `str`) ends with the given target string (second argument, `target`).

This challenge *can* be solved with the `.endsWith()` method, which was introduced in ES2015. But for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.
This challenge _can_ be solved with the `.endsWith()` method, which was introduced in ES2015. But for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.

# --hints--

`confirmEnding("Bastian", "n")` should return `true`.

```js
assert(confirmEnding('Bastian', 'n') === true);
assert.isTrue(confirmEnding('Bastian', 'n'));
```

`confirmEnding("Congratulation", "on")` should return `true`.

```js
assert(confirmEnding('Congratulation', 'on') === true);
assert.isTrue(confirmEnding('Congratulation', 'on'));
```

`confirmEnding("Connor", "n")` should return `false`.

```js
assert(confirmEnding('Connor', 'n') === false);
assert.isFalse(confirmEnding('Connor', 'n'));
```

`confirmEnding("Walking on water and developing software from a specification are easy if both are frozen", "specification")` should return `false`.

```js
assert(
assert.isFalse(
confirmEnding(
'Walking on water and developing software from a specification are easy if both are frozen',
'specification'
) === false
)
);
```

`confirmEnding("He has to give me a new name", "name")` should return `true`.

```js
assert(confirmEnding('He has to give me a new name', 'name') === true);
assert.isTrue(confirmEnding('He has to give me a new name', 'name'));
```

`confirmEnding("Open sesame", "same")` should return `true`.

```js
assert(confirmEnding('Open sesame', 'same') === true);
assert.isTrue(confirmEnding('Open sesame', 'same'));
```

`confirmEnding("Open sesame", "sage")` should return `false`.

```js
assert(confirmEnding('Open sesame', 'sage') === false);
assert.isFalse(confirmEnding('Open sesame', 'sage'));
```

`confirmEnding("Open sesame", "game")` should return `false`.

```js
assert(confirmEnding('Open sesame', 'game') === false);
assert.isFalse(confirmEnding('Open sesame', 'game'));
```

`confirmEnding("If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing", "mountain")` should return `false`.

```js
assert(
assert.isFalse(
confirmEnding(
'If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing',
'mountain'
) === false
)
);
```

`confirmEnding("Abstraction", "action")` should return `true`.

```js
assert(confirmEnding('Abstraction', 'action') === true);
assert.isTrue(confirmEnding('Abstraction', 'action'));
```

Your code should not use the built-in method `.endsWith()` to solve the challenge.

```js
assert(!/\.endsWith\(.*?\)\s*?;?/.test(__helpers.removeJSComments(code)) && !/\['endsWith'\]/.test(__helpers.removeJSComments(code)));
assert.notMatch(__helpers.removeJSComments(code), /\.endsWith\(.*?\)\s*?;?/);
assert.notMatch(__helpers.removeJSComments(code), /\['endsWith'\]/);
```

# --seed--
Expand All @@ -99,7 +100,7 @@ function confirmEnding(str, target) {
return str;
}

confirmEnding("Bastian", "n");
confirmEnding('Bastian', 'n');
```

# --solutions--
Expand All @@ -109,5 +110,5 @@ function confirmEnding(str, target) {
return str.substring(str.length - target.length) === target;
}

confirmEnding("Bastian", "n");
confirmEnding('Bastian', 'n');
```
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,37 @@ The formula to convert from Celsius to Fahrenheit is the temperature in Celsius
`convertCtoF(0)` 應該返回一個數字

```js
assert(typeof convertCtoF(0) === 'number');
assert.isNumber(convertCtoF(0));
```

`convertCtoF(-30)` 應該返回 `-22` 的值

```js
assert(convertCtoF(-30) === -22);
assert.strictEqual(convertCtoF(-30), -22);
```

`convertCtoF(-10)` 應該返回 `14` 的值

```js
assert(convertCtoF(-10) === 14);
assert.strictEqual(convertCtoF(-10), 14);
```

`convertCtoF(0)` 應該返回 `32` 的值

```js
assert(convertCtoF(0) === 32);
assert.strictEqual(convertCtoF(0), 32);
```

`convertCtoF(20)` 應該返回 `68` 的值

```js
assert(convertCtoF(20) === 68);
assert.strictEqual(convertCtoF(20), 68);
```

`convertCtoF(30)` 應該返回 `86` 的值

```js
assert(convertCtoF(30) === 86);
assert.strictEqual(convertCtoF(30), 86);
```

# --seed--
Expand All @@ -67,7 +67,7 @@ convertCtoF(30);

```js
function convertCtoF(celsius) {
let fahrenheit = celsius * 9/5 + 32;
let fahrenheit = celsius * (9 / 5) + 32;
return fahrenheit;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ For example: `5! = 1 * 2 * 3 * 4 * 5 = 120`
`factorialize(5)` 應返回一個數字。

```js
assert(typeof factorialize(5) === 'number');
assert.isNumber(factorialize(5));
```

`factorialize(5)` 應該返回 `120`

```js
assert(factorialize(5) === 120);
assert.strictEqual(factorialize(5), 120);
```

`factorialize(10)` 應該返回 `3628800`

```js
assert(factorialize(10) === 3628800);
assert.strictEqual(factorialize(10), 3628800);
```

`factorialize(20)` 應該返回 `2432902008176640000`

```js
assert(factorialize(20) === 2432902008176640000);
assert.strictEqual(factorialize(20), 2432902008176640000);
```

`factorialize(0)` 應該返回 `1`

```js
assert(factorialize(0) === 1);
assert.strictEqual(factorialize(0), 1);
```

# --seed--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You should not mutate `arr`.
```js
const arr = ['a', false, 0, 'Naomi'];
bouncer(arr);
assert.deepEqual(arr, ['a', false, 0, 'Naomi'])
assert.deepEqual(arr, ['a', false, 0, 'Naomi']);
```

# --seed--
Expand All @@ -57,7 +57,7 @@ function bouncer(arr) {
return arr;
}

bouncer([7, "ate", "", false, 9]);
bouncer([7, 'ate', '', false, 9]);
```

# --solutions--
Expand All @@ -67,5 +67,5 @@ function bouncer(arr) {
return arr.filter(e => e);
}

bouncer([7, "ate", "", false, 9]);
bouncer([7, 'ate', '', false, 9]);
```
Loading

0 comments on commit 7eca12f

Please sign in to comment.