Understanding Promise.any() in JavaScriptIntroduction The Promise.any() static method takes an iterable of promises as input and returns a single Promise. This returned promise fulfills when any of the input promises fulfills, with the value of the first fulfilled promise. It rejects when a...May 17, 2024 · 3 min readrohitdasu.hashnode.dev
A Guide to Promise.all() in JavaScriptIntroduction The Promise.all() static method takes a list of promises as input and returns a single Promise. This returned promise is fulfilled when all the input promises are fulfilled (including when an empty list is passed), with an array of the f...May 16, 2024 · 3 min readrohitdasu.hashnode.dev
JavaScript Promises Explained SimplyDefinition A Promise is a placeholder for a value that may not be known when the promise is created. It lets you attach handlers to an asynchronous action's eventual success or failure. This allows asynchronous methods to return values like synchrono...May 14, 2024 · 3 min readrohitdasu.hashnode.dev
The most confusing array methodReduce() is not just another array method; it's more than that. Do you think I'm exaggerating? No, I'm not. Keep reading below to find out why. This array method requires two arguments: Callback function This callback function is invoked with the f...May 13, 2024 · 2 min readrohitdasu.hashnode.dev
Is Closure in JS really that complicatedThe definition Closure is bundling of two or more functions, where inner function has access to the properties and methods of the outer functions. function calculate() { var num1 = 10; function add(num2) { return num1 + num2; // retur...May 12, 2024 · 1 min readrohitdasu.hashnode.dev