---
title: "Discussion on \"JavaScript promises explained\" | Hashnode"
description: "Discussion on \"JavaScript promises explained\". Promises are one of the core features of JavaScript. What they are and how to use them? We answer those questions and provide code examples."
url: "https://hashnode.com/posts/javascript-promises-explained/628c9856bc26026fa45c32ea"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript promises explained](https://blog.thecode.xyz/javascript-promises-explained?utm_source=hashnode&utm_medium=feed)

Promises are one of the core features of JavaScript. What they are and how to use them? We answer those questions and provide code examples.

May 24, 2022 · 7 min read · blog.thecode.xyz  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#async](https://hashnode.com/tag/async)

## Written by

[Tomek Skupiński](https://hashnode.com/@focusinsky)

@focusinsky

  
[View profile](https://hashnode.com/@focusinsky)

Software Engineer, 1/3 of thecode.xyz

I’m Tomek, software engineer, working mostly with Ruby on Rails. I work remotely at Mixlr where every day we deliver live audio to millions of listeners. After hours, I write, read, and help my wife run theCode.xyz

## Responses 2

Markdown supported · ⌘↵ to post

[Venu](https://hashnode.com/@Venuweb3)

[May 28, 2022](https://hashnode.com/posts/javascript-promises-explained/628c9856bc26026fa45c32ea/comment/6292428fd97f80b5091d98bb)

Thanks for the article mate....

[Miki Szeles](https://hashnode.com/@mszeles)

[May 24, 2022](https://hashnode.com/posts/javascript-promises-explained/628c9856bc26026fa45c32ea/comment/628cba43b4bd016fc9a30b63)

Great article, Tomek. 👏👏

I remember how confusing was when I first faced promises. Your article explains them well.

What are the usecases of already resolved or rejected promises?

[Tomek Skupiński](https://hashnode.com/@focusinsky)

[May 24, 2022](https://hashnode.com/posts/javascript-promises-explained/628c9856bc26026fa45c32ea/comment/628cba43b4bd016fc9a30b63#reply-628cf60ebc26026fa45c44f2)

That's a valid question. I haven't used them (still learning JS and treating these articles as a brain dump after each topic I go through). But the first idea that comes to my mind would be using them in tests whenever I wanna stub some async function. Do you think it would work?

[Miki Szeles](https://hashnode.com/@mszeles)

[May 24, 2022](https://hashnode.com/posts/javascript-promises-explained/628c9856bc26026fa45c32ea/comment/628cba43b4bd016fc9a30b63#reply-628cfcdab4bd016fc9a31b22)

Good question, I have no idea, [Tomek Skupiński](https://hashnode.com/@focusinsky) and I am too tired to google it. 🤣🤣🤣
