mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-11 07:00:41 -04:00
fix(curriculum): step 86 of the platform game now requests an truthy value (#54549)
This commit is contained in:
@@ -7,13 +7,13 @@ dashedName: step-86
|
||||
|
||||
# --description--
|
||||
|
||||
Next, add an `if` statement that checks if every rule in the `collisionDetectionRules` array is `true`. Make sure to use the `every` method for this.
|
||||
Next, add an `if` statement that checks if every rule in the `collisionDetectionRules` array is truthy. Make sure to use the `every` method for this.
|
||||
|
||||
Inside the body of the `if` statement, assign the number 0 to the player's `y` velocity followed by a `return` statement.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should have an if statement that uses the `every` method to check if every rule in the `collisionDetectionRules` array is `true`.
|
||||
You should have an if statement that uses the `every` method to check if every rule in the `collisionDetectionRules` array is truthy.
|
||||
|
||||
```js
|
||||
assert.match(code, /if\s*\(\s*collisionDetectionRules\.every\(\s*(?:\(\s*(.+)\s*\)\s*=>\s*\1|([^\s()]+)\s*=>\s*\2)\s*\)\s*\)\s*\{\s*/);
|
||||
|
||||
Reference in New Issue
Block a user