JavaScript - find And findIndex

JavaScript - find And findIndex

The Array.prototype.findIndex() and Array.prototype.find() methods are useful to search the provided array. The findIndex() method returns the index of the...

Javascript - 4 months ago

JavaScript - Optional chaining (?.)

JavaScript - Optional chaining (?.)

Optional chaining allows you to safely access the nested object properties. In general, to access the nested object properties you...

Javascript - 4 months ago

JavaScript - Nullish coalescing operator (??)

JavaScript - Nullish coalescing operator (??)

The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand...

Javascript - 4 months ago

JavaScript - Logical assignment operators

JavaScript - Logical assignment operators

Logical assignment operators are new compound assignment operators that combine the logical operations &&, ||, or ?? with assignment x...

Javascript - 4 months ago

Javascript - replaceAll

Javascript - replaceAll

String.prototype.replaceAll provides an easy way to replace all occurrences of a substring without creating a global RegExp. const queryString =...

Javascript - 4 months ago

Javascript - Promise.any

Javascript - Promise.any

Promise.any is a promise combinator that resolves the resulting promise as soon as one of the input promises is fulfilled....

Javascript - 4 months ago

Node.js 12: Private Class Fields

Node.js 12: Private Class Fields

Javascript allows us to declare fields inside the class. We can access its own fields or properties by creating an...

Javascript - 10 months ago

How to Remove Duplicates from JavaScript Array

How to Remove Duplicates from JavaScript Array

You can use the JavaScript built in object Set to keep unique values of any type. You can make use...

Javascript - 2 years ago

Async Await Error handling

Async Await Error handling

In this post, I will show how to add error handling when using async/await. One of the goals of async/await...

Javascript - 3 years ago

How To Capitalize The First Letter Of A String In JavaScript

How To Capitalize The First Letter Of A String In JavaScript

Here is the quick JavaScript code snippet to capitalize the first letter of a string. function ucFirst(string) { return string.charAt(0).toUpperCase()...

Javascript - 3 years ago