We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 576f4ef + 5d882d9 commit e9b473fCopy full SHA for e9b473f
README.md
@@ -274,15 +274,9 @@ function emailClients(clients) {
274
**Good**:
275
```javascript
276
function emailClients(clients) {
277
- clients.forEach(client => {
278
- emailClientIfNeeded(client);
279
- });
280
-}
281
-
282
-function emailClientIfNeeded(client) {
283
- if (isClientActive(client)) {
284
- email(client);
285
- }
+ clients
+ .filter(isClientActive)
+ .forEach(email);
286
}
287
288
function isClientActive(client) {
0 commit comments