Christian Sousa
07/17/2020, 3:39 PMlet finished = false
for (let i = 0; i < restrictions.length && !finished; i++) {
finished = ...
}
Dominaezzz
07/17/2020, 3:40 PMbreak
with for (i in 0 until restrictions.length)
?diesieben07
07/17/2020, 3:41 PMrestrictions
is, you might be able to use for (i in restrictions.indices)
or even just for (element in restrictions)
Christian Sousa
07/17/2020, 3:41 PM!finished
.
Should I just break inside the for
?Casey Brooks
07/17/2020, 3:47 PMval finished = restrictions.any { ... }
for a more ideomatic approachShawn
07/17/2020, 7:09 PMi
advances), then .any {}
wouldn’t be the right tool for the jobChristian Sousa
07/20/2020, 4:24 PM