Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.


  • Use Ctrl + F or command + F to search for a snippet.
  • Contributions welcome, please read the contribution guide.
  • Snippets are written in ES6, use the Babel transpiler to ensure backwards-compatibility.
  • You can import these snippets into your text editor of choice (VSCode, Atom, Sublime) using the files found in this repo.
  • You can import these snippets into Alfred 3, using this file.
  • If you want to follow 30-seconds-of-code on social media, you can find us on Facebook, Instagram and Twitter.

Related projects

30 Seconds of CSS
30 Seconds of Interviews
30 Seconds of Python (unofficial)
30 Seconds of PHP (unofficial)

Table of Contents

???? Adapter
???? Array
???? Browser
⏱️ Date
????️ Function
➗ Math
???? Node
????️ Object
???? String
???? Type
???? Utility

View Detailed Table of Content here

Subscribe to the Newsletter

Get our latest news,tutorials,guides,tips & deals delivered to your inbox.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.