DEV Community

Karthikeyan
Karthikeyan

Posted on

2 3 4 2 2

One Byte Explainer - Promise

Hello 👋

Let's start with Promise

One-Byte Explainer:

Promises are like a waiter taking your order. They handle results which can be either success or failure.

Demystifying JS: Promise in Action

  1. Place the Order: You give your order to the waiter (Promise).

  2. Waiter Takes Order: The waiter takes your order (async task begins).

  3. Continue Waiting: While waiting for the order (promise results), you can do other things (program continues to run).

  4. Food Arrives (or Not): The waiter brings your food (success) or tells you there's an issue (error).

  5. React to Result: Based on the result, if success, you enjoy the food; if error, you order something else.

Thank you for reading , See you in the next blog

final

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay