Article
Arrays are one the most used structures in JavaScript programming, which is why it's important to know its built-in methods like the back of your pocket. In this tutorial, we'll take a look at how to split an array into chunks of n size in JavaScript. Specifically, we'll take a...
Abhilash Kakumanu
In JavaScript, an object is defined as a collection of key-value pairs. An object is also a non-primitive data type. You'll oftentimes need to combine objects into a single one which contains all the individual properties of its constituent parts. This operation is called merging. The two most common ways...
Having to manually format a number as a currency string can be a tedious process. Even though this can oftentimes be done in a few lines of code, it's good practice to follow a standardized norm rather than hardcode it yourself, plus it's way easier for the developer writing the...
Osama Akhtar
Dates are a really common data type developers work with. From timestamps of certain actions, to reports, sign up features and limited-time access in systems that require subscriptions - we oftentimes have to compare dates. That is, we compare if a date is after or before another, if the date...
It is imperative to carry out server-side validation when building applications - especially client-facing applications. The reason being, one can never rely on the user’s input alone; as these inputs sometimes contain bogus/malicious data. Client-side validation is a great way to sift through most of the input, but...
Guest Contributor
Most web applications nowadays will require you to fill out a form at some point, be it an online banking application or a music streaming service. And because end users are never to be trusted, we need to fool-proof our application so that it detects when the input is incorrect...
An object in JavaScript is a collection of key-value pairs. One of these key-value pairs is called an object property. Both keys and values of properties can be of any data type - Number, String, Array, Object, etc. For example: const dog = { name: "Sandy", age: 3, emoji: "...
In English, it's essential to capitalize the first letter of a sentence. JavaScript has built-in methods to help us with this. In this article we will look at three different ways to check if the first letter of a string is upper case and how to capitalize it. Check if...
Comparison operators are used in logical statements to determine whether two variables or objects are equal by some already set or custom defined criteria. If the two variables or objects are deduced to be equal the operator returns true, and false if they aren't. Comparison operators in JavaScript are: <...
Mila Lukic
© 2013-2025 Stack Abuse. All rights reserved.