Author: saqibkhan

  • Promisification

    Promisification in JavaScript Promisification in JavaScript is a concept to convert the callback functions into a regular function, returning the promise. The reason to convert the callback functions into promises is that when you need to write the nested callback functions, it increases the complexity of the code. So, you can write a function returning…

  • Microtasks

    Microtasks in JavaScript are small functions that are executed after the completion of the function or program code that creates them and if the JavaScript execution stack is empty. Microtasks are executed before any macrotasks, such as setImmediate() and setTimeout(). Microtasks are used to implement features such as promises. JavaScript is a single-threaded programming language.…

  • Async/Await

    The JavaScript functions defined with the async/await keyword can perform the same task as promises with fewer lines of code, and it makes the code readable. The promise’s syntax is a bit complex, so the async/await syntax is introduced. To use async/await, we need to define an aync function first. For this we write async before function…

  • Promises

    What is Promise in JavaScript? A JavaScript promise is an object that represents the completion or failure of an asynchronous operation. It employs callback functions to manage asynchronous operations, offering a easier syntax for handling such operations more easily. A promise object can created using the Promise() constructor. The promise constructor takes a callback function…

  • Callback Functions

    What is the Callback Function? The callback function in JavaScript is regularly passed as an argument of another function. Dont consider the callback as a name or keyword here. The callback function name can be any valid identifier. The callback function can be called inside the parent function after completing the particular task in the…

  • Asynchronous

    Asynchronous JavaScript is a programming technique that enables your program to start a potentially long-running task and continue to executing other tasks parallelly. JavaScript is a single-threaded programming language. It means you can execute a single script or particular code at a time. JavaScript control flow moves the line by line and executes each line…

  • ECMAScript 2022

    The ECMAScript 2022 standard was released in 2022. Important features added to this update include private methods and fields, Array at() and String at() methods etc. This chapter discuss all the newly added features in ECMAScript 2022. New Features Added in ECMAScript 2022 Here are the new methods, features, etc., added to the ECMAScript 2022 version of JavaScript. Here, we have explained…

  • ECMAScript 2021

    The ECMAScript 2021 standard was released in 2021. ECMAScript 2021 brought many notable features to JavaScript. The introduction of the String replaceAll() method simplified global string replacement. Logical Assignment Operators, (&&=, ||=, and ??=), enhanced code conciseness. This update focused on improving developer productivity and code readability. This chapter will discuss all the newly added features in ECMAScript 2021. New Features…

  • ECMAScript 2020

    The ECMAScript 2020 version of JavaScript was released in 2020. Notable features added in this version include the nullish coalescing operator (??) for more concise default value assignment and dynamic import() for on-demand module loading. BigInt provides a way to safely work with very large integers. This chapter will discuss all the newly added features in ECMAScript 2020. Features…

  •  ECMAScript 2019

    The ECMAScript 2019 standard was released in 2019. Important additions to this update include Array flat() and Array flatMap(), offering concise array manipulation methods. The Object.fromEntries() method simplifies object creation from key-value pairs. These improvements in ECMAScript 2019 aimed to enhance code conciseness and functionality. This chapter will discuss all the newly added features in ECMAScript 2019. New Features Added in…