Last active
June 24, 2020 15:02
-
-
Save rjcorwin/e4c0714c28efb7960d8532e959959c16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shouldGridAutoStop() { | |
const firstXButtons = tangyToggleButtons.slice(0, this.autoStop) | |
const hasAtLeastOneUnpressedButton = firstXButtons | |
.reduce((hasAtLeastOne, button) => hasAtLeastOne || button.pressed === false ? true : false, false) | |
return hasAtLeastOneUnpressedButton ? false : true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reduce "trip wire" is written as such where
yourCondition()
is your custom condition of something you are looking to find at least once....