Short Pieces

How to Sort by Date in JavaScript?

Learn how to sort by date in JavaScript with simple examples. Sort arrays of date strings or objects with date fields using JavaScript’s sort() method.

Group by Year, Month, or Day in MySql

How to group data by specific date interval using DATE_FORMAT(), EXTRACT() functions, and some helpers like YEAR(), MONTH(), DAY(), and DATE() in MySQL.

Group by Year, Month, or Day in PostgreSQL

How to group data by specific date interval using DATE_TRUNC(), EXTRACT(), or TO_CHAR() functions in PostgreSQL.

Exponentiation in JavaScript: A Beginner's Guide

Exponentiation refers to a mathematical process of multiplying a number by itself. In JavaScript, you can perform it using the ** operator or Math.pow() method.

How to Break from forEach in JavaScript?

There is no direct way to break from the forEach() function, however, there are some workarounds.

JavaScript: Add To Array Just If Element Doesn’t Exist

In JavaScript, how to add an element to an array just if it does not yet exist within the given array or ignore the process if it already exists?

The Double Question Mark (Nullish Coalescing Operator) in JavaScript

In JavaScript, the Double Question Mark (Nullish Coalescing Operator) is a special case from the OR Logical Operator (||). Let's introduce some use cases of it.
Scroll to Top