JavaScript , , , 0 Comments

In this article, we will learn the new well-formed JSON stringify JavaScript method introduced in ES10/2019 with examples and comparisons with the old one. RFC 8259 section 8.1 requires JSON text exchanged outside the scope of a closed ecosystem to be encoded using UTF-8, but JSON.stringify can return strings including code points that have no representation in UTF-8

Read More

JavaScript , , , 0 Comments

In this article, we are gonna talk about JavaScript fromEntries method. fromEntries introduced in ES10/2019 and it is an object method, we will cover basics and different types of examples. Let’s start, Object.fromEntries is a very useful built-in JavaScript method that transforms a list of key-value pairs into an object. Let’s see the quick basic example

Read More

JavaScript , , , , 0 Comments

We can use JavaScript matchAll method on any string and it returns all the matching results as an iterator that works easily with for…of loops and has properties like index, input and groups. It will return an empty iterator object if nothing matched. Simple Example As I said before JavaScript matchAll method will return an iterator of

Read More

JavaScript , , 0 Comments

An Arrow Function in JavaScript also called a “Fat arrow” function is a syntactically compact alternative to a regular function expression. It allows us to write shorter function syntax. Arrow functions are anonymous and change the way this binds in functions. Arrow functions doesn’t support its own bindings to the this, arguments, super, or new.target

Read More