<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/sources/30seconds/best-of/2022/09" -->

---
title: Best 30 seconds of code posts — September 2022 | daily.dev
description: The most upvoted 30 seconds of code posts from September 2022, curated by the daily.dev community.
canonical: https://daily.dev/sources/30seconds/best-of/2022/09
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:url: https://daily.dev/sources/30seconds/best-of/2022/09
og:type: website
og:site_name: daily.dev
og:title: Best 30 seconds of code posts — September 2022 | daily.dev
og:description: The most upvoted 30 seconds of code posts from September 2022, curated by the daily.dev community.
og:image: https://media.daily.dev/image/upload/s--VAY5ToZt--/f_auto/v1724209435/public/daily.dev%20-%20open%20graph
---

# Best of 30 seconds of code — September 2022

1. 1  
[](https://daily.dev/posts/javascript-array-filtering-tips-okntujfsb "JavaScript array filtering tips")  
Article  
![Avatar of 30seconds](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/197d6538eea141d7a2fb4177234e9d89)30 seconds of code · 4y  
JavaScript array filtering tips  
If you are looking for a single result in an array, you can use Array.prototype.find() instead. This will return the first element that satisfies the condition, or undefined if no such element exists. If you don't mind mutating the original array, it can be significantly faster than the previous one.  
14
2. 2  
[](https://daily.dev/posts/what-is-the-difference-between-async-and-defer-in-script-loading--tcnxhlxjl "What is the difference between async and defer in script loading?")  
Article  
![Avatar of 30seconds](https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/197d6538eea141d7a2fb4177234e9d89)30 seconds of code · 4y  
What is the difference between async and defer in script loading?  
A plain <script> tag without attributes is what most people tend to start with. This implements the default browser behavior. The HTML will be parsed until the script tag is encountered. At this point, HTML parsing will be paused and the script will be loaded. The script will then be executed before HTML parsing can resume.  
14

[See all 30 seconds of code archives](/sources/30seconds/best-of)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@graph":[{"@type":"CollectionPage","@id":"https://daily.dev/sources/30seconds/best-of/2022/09#page","url":"https://daily.dev/sources/30seconds/best-of/2022/09","name":"Best 30 seconds of code Posts — September 2022","description":"The most upvoted 30 seconds of code posts from September 2022, curated by the daily.dev community.","isPartOf":{"@type":"WebSite","url":"https://daily.dev"}},{"@type":"ItemList","@id":"https://daily.dev/sources/30seconds/best-of/2022/09#items","numberOfItems":2,"itemListElement":[{"@type":"ListItem","position":1,"url":"https://daily.dev/posts/javascript-array-filtering-tips-okntujfsb","name":"JavaScript array filtering tips"},{"@type":"ListItem","position":2,"url":"https://daily.dev/posts/what-is-the-difference-between-async-and-defer-in-script-loading--tcnxhlxjl","name":"What is the difference between async and defer in script loading?"}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sources","item":"https://daily.dev/sources"},{"@type":"ListItem","position":3,"name":"30 seconds of code","item":"https://daily.dev/sources/30seconds"},{"@type":"ListItem","position":4,"name":"Best of","item":"https://daily.dev/sources/30seconds/best-of"},{"@type":"ListItem","position":5,"name":"September 2022"}]}]}
```

