How are HTMLElement.innerText and Node.textContent different?
While these two properties are very similar, there are some key differences that you should be aware of.
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.
While these two properties are very similar, there are some key differences that you should be aware of.
Displays an image overlay effect on hover.
A hover effect where the gradient follows the mouse cursor.
Renders an alert component with type
prop.
Renders a file drag and drop component for a single file.
Renders a button that animates a ripple effect when clicked.
Learn how to use data attributes to represent UI state and level up your HTML and CSS game.
Renders a star rating component.
Enables body scroll locking.
Creates a responsive image mosaic.
Creates a custom hover and focus effect for navigation items, using CSS transformations.
Boolean traps can cause readability and maintainability issues in your code. Learn what they are, how to spot and fix them in this article.
Learn all you need to know to effectively and efficiently typecheck values in JavaScript.
Level up your JavaScript logging with these console.log()
tips and tricks.
Learn how to combine two or more objects into a single object in JavaScript.
Displays a menu overlay when the user hovers over the image.
Asynchronously looping over arrays in JavaScript comes with a few caveats you should watch out for.
A binary tree is a hierarchical data structure of linked nodes with at most two children each.
Enums are part of TypeScript, but what about defining enums in plain old JavaScript? Here are a few way you can do that.
Creates an object containing the parameters of the current URL.
The Node.js test module is a new testing tool that's still in its early stages. Learn more about it in this short introduction.
Handles asynchronous calls.
Creates a stateful Map
object, and a set of functions to manipulate it.
Don't fall victim to bad advice! Learn to identify "senior juniorism", and develop critical thinking to make better coding decisions.