30 seconds of code provides a curated collection of short code snippets for all your development needs. Our collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Learn how to use the JavaScript ES6 spread syntax to converting iterables to arrays and level up your code today.
JavaScript, Object · Jun 12, 2021
Take a deeper dive into React's rendering process and understand how to make small yet powerful tweaks to optimize performance.
React, Render · Jun 12, 2021
Creates a list with floating headings for each section.
CSS, Visual · Oct 11, 2021
A hover effect where the gradient follows the mouse cursor.
CSS, Visual · Jan 7, 2021
Level up your JavaScript logging with these console.log()
tips and tricks.
JavaScript, Browser · Jun 12, 2021
Boolean traps can cause readability and maintainability issues in your code. Learn what they are, how to spot and fix them in this article.
JavaScript, Function · Jul 11, 2021
Renders a file drag and drop component for a single file.
React, Components · Oct 13, 2021
Asynchronously looping over arrays in JavaScript comes with a few caveats you should watch out for.
JavaScript, Array · Jun 12, 2021
Enums are part of TypeScript, but what about defining enums in plain old JavaScript? Here are a few way you can do that.
JavaScript, Object · Jun 12, 2021
Learn how JavaScript handles mutable data, such as objects and arrays, and understand how shallow cloning and deep cloning work.
JavaScript, Object · Jun 12, 2021
A binary tree is a data structure consisting of a set of linked nodes representing a hierarchical tree structure, in which each node can have at most two children.
JavaScript, Class · Aug 26, 2021
Creates a custom hover and focus effect for navigation items, using CSS transformations.
CSS, Visual · Oct 11, 2021