SyntaxFix
Write A Post
Hire A Developer
Questions
Making use of JavaScripts short-circuit evaluation. If el.shouldBeProcessed returns true, doSomeLengthyOperation
el.shouldBeProcessed
doSomeLengthyOperation
elementsCollection.forEach( el => el.shouldBeProcessed && doSomeLengthyOperation() );