fix(curriculum): step 86 of the platform game now requests an truthy value (#54549)

This commit is contained in:
Anna
2024-04-29 02:37:14 -04:00
committed by GitHub
parent 9be7d24de3
commit f427701588

View File

@@ -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*/);