---
title: "Discussion on \"Use Generators, Promises & recursion to write synchronous like asynchronous code!\" | Hashnode"
description: "Discussion on \"Use Generators, Promises & recursion to write synchronous like asynchronous code!\". In JavaScript, functions execute until they've reached a return keyword or the end of the function. If we execute our logger here and run it with Node, you will see that it first logs start, and it then logs end. EA6 generators are different. They ca..."
url: "https://hashnode.com/posts/use-generators-promises-and-recursion-to-write-synchronous-like-asynchronous-code/60995c4e1ea29f2c341e340a"
---

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

Discussion

# [Use Generators, Promises & recursion to write synchronous like asynchronous code!](https://lucasacosta.hashnode.dev/use-generators-promises-and-recursion-to-write-synchronous-like-asynchronous-code?utm_source=hashnode&utm_medium=feed)

In JavaScript, functions execute until they've reached a return keyword or the end of the function. If we execute our logger here and run it with Node, you will see that it first logs start, and it then logs end. EA6 generators are different. They ca...

May 10, 2021 · 4 min read · lucasacosta.hashnode.dev  
Read the article

-   [#generators](https://hashnode.com/tag/generators)
-   [#promises](https://hashnode.com/tag/promises)
-   [#recursion](https://hashnode.com/tag/recursion)
-   [#asynchronous](https://hashnode.com/tag/asynchronous)

## Written by

[Lucas Acosta](https://hashnode.com/@LucasAcosta)

@LucasAcosta · Spain

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

Frontend developer

## Responses

Comments are turned off for this post.
