Learn Intermediate OOP by Building a Platformer Game - Step 91

Tell us what’s happening:

if (platformDetectionRules.every(rule => true));
not understanding what’s wrong

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

if (platformDetectionRules.every(rule => true))

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.3.1 Safari/605.1.15

Challenge Information:

Learn Intermediate OOP by Building a Platformer Game - Step 91

You are going to want curly braces with that if statement because you will eventually be adding multiple lines of code to it.

this is returning true for every element of the array, you want to return the element of the array itself so that it can be checked if it is true or false

1 Like

thank you I figured it out