mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-19 21:09:51 +08:00
fix(curriculum): remove leftover console.log from hints (#53481)
This commit is contained in:
parent
9e24f1f28d
commit
78c4f0871a
@ -28,7 +28,6 @@ assert.notMatch(calculate.toString(), /filtered/);
|
||||
You should chain your `.filter()` call to your `.map()` call.
|
||||
|
||||
```js
|
||||
console.log(calculate.toString());
|
||||
assert.match(calculate.toString(), /array\.map\(.*\)\.filter\(/s);
|
||||
```
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ assert.match(getMode.toString(), /array\.forEach\(/);
|
||||
Your `.forEach()` method should have a callback function which takes an `el` parameter.
|
||||
|
||||
```js
|
||||
console.log(getMode.toString());
|
||||
assert.match(getMode.toString(), /(array\.forEach\(\(?\s*el\s*\)?\s*=>|array\.forEach\(function\s*\(?el\)?\s*\{)/);
|
||||
```
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@ assert.match(getVariance.toString(), /sumSquaredDifferences\s*=\s*squaredDiffere
|
||||
Your `reduce` callback should return the sum of `acc` and `el`.
|
||||
|
||||
```js
|
||||
console.log(getVariance.toString());
|
||||
assert.match(getVariance.toString(), /sumSquaredDifferences\s*=\s*squaredDifferences\.reduce\(function\s*\(?\s*acc\s*,\s*el\s*\)?\s*\{\s*return\s*acc\s*\+\s*el\s*\;\s*\},\s*0\s*\)/);
|
||||
```
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ Set `name` to `cave`. Set `button text` to an array with the strings `Fight slim
|
||||
You should have three values in your `locations` array.
|
||||
|
||||
```js
|
||||
console.log(locations);
|
||||
assert.lengthOf(locations, 3);
|
||||
```
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ Add a new object to the end of the `locations` array, following the same propert
|
||||
Your `locations` array should have 4 values in it.
|
||||
|
||||
```js
|
||||
console.log(locations);
|
||||
assert.lengthOf(locations, 4);
|
||||
```
|
||||
|
||||
|
||||
@ -33,7 +33,6 @@ assert.match(attack.toString(), /text\.innerText\s*\+=\s*('|")\sYour\s\1/);
|
||||
You should add the return value of `inventory.pop()` to the ` Your ` string.
|
||||
|
||||
```js
|
||||
console.log(attack.toString());
|
||||
assert.match(attack.toString(), /text\.innerText\s*\+=\s*('|")\sYour\s\1\s*\+\s*inventory\.pop\(\)/);
|
||||
```
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ assert.match(pick.toString(), /text\.innerText\s*\+=\s*numbers\s*\[\s*i\s*\]/);
|
||||
You should add a new-line character after the `numbers[i]` value. Remember that you can do this with `\n`.
|
||||
|
||||
```js
|
||||
console.log(pick.toString());
|
||||
assert.match(pick.toString(), /text\.innerText\s*\+=\s*numbers\s*\[\s*i\s*\]\s*\+\s*('|")\\n\1/);
|
||||
```
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@ assert.match(afterCalculateTaxes, /amount\s*\*\s*\(\s*this\s*\.\s*taxRate\s*\/\s
|
||||
Your `calculateTaxes` method should return the value of the `taxRate` (divided by 100, to convert it to a percent) multiplied by the `amount` parameter.
|
||||
|
||||
```js
|
||||
console.log(cart.calculateTaxes(10), (cart.taxRate / 100) * 10);
|
||||
assert.equal(cart.calculateTaxes(10), (cart.taxRate / 100) * 10);
|
||||
```
|
||||
|
||||
|
||||
@ -24,7 +24,6 @@ Use the `.reverse()` method to reverse the order of the `remainders` array, and
|
||||
You should use the `.reverse()` method on the `remainders` array.
|
||||
|
||||
```js
|
||||
console.log(String(decimalToBinary))
|
||||
assert.match(String(decimalToBinary), /remainders\.reverse\(\s*\)/);
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user