The currentColor CSS keyword
The currentColor
CSS keyword is a nifty alternative to custom properties for simple use cases.
Finding ways to improve and optimize your code takes a lot of time, research and energy. Level up your coding skills one step at a time with this collection of quick tips and tricks.
The currentColor
CSS keyword is a nifty alternative to custom properties for simple use cases.
Create a debounced function that waits a certain amount of time before invoking the provided function again.
Did you accidentally commit to master
instead of a feature branch? Here's how you can move those commits to a new branch.
Learn how to view a summary of changes between two Git commits, using a single command.
Use special Unicode characters to print text in color in the console.
Calculate the number of days in a month for a given year using JavaScript.
Find the prime factors of a number using trial division in JavaScript.
Combining Math.random()
and a few simple math operations, you can generate an array of random integers in a specified range.
Use a simple JavaScript trick to validate a serialized JSON object.
Use a regular expression to remove HTML/XML tags from a string.
Check if an iterable is a superset of another one, excluding duplicate values.
Make sure to use the correct method when checking if a JavaScript object is an array.
Mutable default arguments can trip up Python beginners and veterans alike. Here's a quick workaround to deal with them.
Avoid unnecessary re-runs by using primitive dependencies in your React effect.
Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
Ever wanted to convert a tilde path to an absolute path? Here's how you can do it in JavaScript.
Scroll listeners can easily become a performance bottleneck for your web application. Here's how to fix that.
Learn how to sort a Python dictionary list using a tuple key.
Quickly and easily determine if a given JavaScript Date
object is a weekday or weekend.
Iteration in JavaScript can be done a handfuld of ways, most often using array methods, but sometimes a for
loop is the best option.
Replace all characters in a string, except for the ending characters, with a mask character.
Learn how to create a promise that resolves after a given amount of time in JavaScript.
Increase your JavaScript code's performance when working with the DOM by leveraging this simple trick.
Have you ever tried to convert the string representation of a boolean to an actual boolean value? Here's a simple way to do it.