Open in app

Sign In

Write

Sign In

राहुल मिश्रा
राहुल मिश्रा

375 Followers

Home

About

Pinned

Why async await not work in forEach ?

I recently encountered a scenario where I was using async await inside forEach, but it was not working inside foreach loop. Here is the demonstration of the problem:

JavaScript

2 min read

Why async await not work in forEach ?
Why async await not work in forEach ?
JavaScript

2 min read


Pinned

catch errors in async/await like a pro

The main reason of using async await is - async await makes our code look like synchronous 🐼 - clean code 🧹 It definitely makes our code look synchronous. But does it really make our code clean? 🤔 Consider bellow code snippet where we have multiple try catch block with await functionality.

JavaScript

2 min read

catch errors in async/await like a pro
catch errors in async/await like a pro
JavaScript

2 min read


Pinned

React Worst Practices — The Beginning

Hello World 🌎

JavaScript

8 min read

React Worst Practices — The Beginning
React Worst Practices — The Beginning
JavaScript

8 min read


Pinned

__proto__ and prototype in JavaScript

Hello World 🌏 Prototype is one of the most important concept in JavaScript and mostly in every interview this question is asked by the interviewer. To understand prototypes, we have to understand few key concepts. lets consider following code snippet:

Reactjs

5 min read

__proto__ and prototype in JavaScript
__proto__ and prototype in JavaScript
Reactjs

5 min read


Nov 27, 2022

JavaScript Interview Questions that made me think — Do I really know JavaScript? — Part 3

Javascript tricky interview questions — Javascript is full of surprises, Here I am sharing few question which seems very interesting. What will be printed in the console?

JavaScript

3 min read

JavaScript Interview Questions that made me think — Do I really know JavaScript? — Part 3
JavaScript Interview Questions that made me think — Do I really know JavaScript? — Part 3
JavaScript

3 min read


Nov 26, 2022

All 4 Flavours of Promises in Javascript

Promise.all Promise.any Promise.allSettled Promise.race — We use promises in order to achieve to some asynchronous tasks. And this is how a promise looks like:

JavaScript

6 min read

All 4 Flavours of Promises in Javascript
All 4 Flavours of Promises in Javascript
JavaScript

6 min read


Nov 19, 2022

Did you know that await can work without promises

awaiting a non promise function or method — Generally we use async/await with promises. Let’s see this with an example: const fetch = ()=> { return new Promise(function(resolve) { setTimeout(()=> { resolve('Done'); }, 3000); }); } async function getList() { const data = await fetch(); console.log(data); } In above code fetch is returning a promise which will be…

JavaScript

3 min read

Did you know that await can work without promises
Did you know that await can work without promises
JavaScript

3 min read


Nov 10, 2022

New Syntax to Set Width Ranges for Your CSS Media Queries

New syntax for range media queries — In almost ~80% of the website media queries are being used. Here is a glimpse of how we use media query: @media screen and (min-width: 400px) { // Screen width should be greater than 400px or equal to 400px } @media screen and (max-width: 400px) { // Screen width should…

CSS

2 min read

New Syntax to Set Width Ranges for Your CSS Media Queries
New Syntax to Set Width Ranges for Your CSS Media Queries
CSS

2 min read


Nov 3, 2022

JavaScript Interview Questions that made me think — Do I really know JavaScript? — Part 2

Javascript tricky interview questions — JavaScript never fails to amaze me, below are the few questions which made think twice before coming to a conclusion. What will be printed in console?

JavaScript

3 min read

JavaScript Interview Questions that made me think — Do I really know JavaScript? — Part 2
JavaScript Interview Questions that made me think — Do I really know JavaScript? — Part 2
JavaScript

3 min read


Nov 1, 2022

JavaScript Label — Rarely used JS Concepts

Here is everything you need to know about javascript labels — TLDR; JavaScript labels are the aliases for code statements which we can use with break and continue . Labels are loop breaker identifiers. Label’s are useful if we have nested loops and we want to break loops in-between. Syntax For Creating Labels: LabelName: (LabelName can be any user defined thing) if(1)…

JavaScript

2 min read

JavaScript Label — Rarely used JS Concepts
JavaScript Label — Rarely used JS Concepts
JavaScript

2 min read

राहुल मिश्रा

राहुल मिश्रा

375 Followers

A passionate iOS Developer since 2014.

Following
  • applied.math.coding

    applied.math.coding

  • Fresh Frontend Links

    Fresh Frontend Links

  • Santal Tech

    Santal Tech

  • Netflix Technology Blog

    Netflix Technology Blog

  • Barack Obama

    Barack Obama

See all (24)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech