How can I split a JavaScript array into two groups?
Learn how to split a JavaScript array into two groups based on a function or an array of values.
30 seconds of code contains a curated collection of code articles covering a wide range of development needs. The collection spans many topics, ranging from simple coding problems to theoretical concepts and development techniques.
Learn how to split a JavaScript array into two groups based on a function or an array of values.
Find the head or tail of a JavaScript array without mutating it.
Calculate a SHA-256 hash in JavaScript using native APIs in both the browser and Node.js.
Check if a number is even or odd using JavaScript using the modulo operator or bitwise AND operator.
Learn how to retrieve the first or last n elements in a JavaScript array with a single line of code.
Hoisting comes up a lot during JavaScript interviews. It's a concept that may require some getting used to, so read our guide to learn more.
Easily apply the degree to radian and radian to degree formulas.
Learn how semantic versioning works and how to use it to correctly version your software.
Learn how to get the first or last N elements of a JavaScript array, using Array.prototype.slice().
Learn the difference between the alt and title attributes on images in HTML.
Learn how to correctly use the alt attribute on images in HTML.
Discover the inner workings of JavaScript arrays and learn about the different ways to initialize them.
A short opinionated print stylesheet to make your websites look great on paper.
Don't fall victim to bad advice! Learn to identify "senior juniorism", and develop critical thinking to make better coding decisions.
Learn how to push and pull changes between local and remote repositories.
Using the Proxy object, we can create chainable dynamic getters for objects in JavaScript.
Learn the simple way to undo a commit in Git without rewriting history.
Learn how to merge a branch in Git with or without creating a merge commit, depending on your team's workflow.
Did you make a mistake but haven't pushed your changes yet? Learn how to rewind back to a specific commit in Git.
Learn how to filter branches based on whether they contain a specific commit or not.
Ever wanted to commit as someone else? Maybe change the author of an existing commit? Here's how.
Learn how to view a short summary of your Git commits using git log.
Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
Reviewing CSS code is a skill that takes time to master. Here are some tips from my personal experience to help you get started.