en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Still a Promise

Open joaquinelio opened this issue 11 months ago • 4 comments

Hello @iliakan

This may be seen as a trivial task at this point. And the point I want to make is explained later in a Fetch task.

But a couple of times I found myself trying to defend the power of async to beginers and even the sync-veterans that love the beauty of result = dbSqlSelect()

they see await as a relief of pain that's why I put it as a await task, and its name

You may do whatever you want with it, put it in another place, delete sillly jokes and comments, drop it entirely and make fun of it. It was fun to write.

joaquinelio avatar Jan 28 '25 18:01 joaquinelio

Sure, let's add something like this, maybe split it into 2 tasks?

One will use .any, the other one .all ?

And perhaps replace horses with fetching urls? Just make a custom fetch function..

iliakan avatar Jan 28 '25 19:01 iliakan

Sure, let's add something like this, maybe split it into 2 tasks? One will use .any, the other one .all ?

And perhaps replace horses with fetching urls? Just make a custom fetch function..

wow that was fast

  • 2 task? Once you finish the first, the other results too obvious. I thought a coment was enough.
    Can do. 2 task or 1 task 2 questions?

  • Fetch? No fun in fetch. I love those horses. I thought a race is more fun and instructive, making a better point with the lazy and the correct way to solve it. Fun image

mm... There is already THAT fetch task https://javascript.info/fetch#fetch-users-from-github it uses fetch, promise all, and json. There you ask NOT TO WAIT one to each other. It's in another section tho, far later in the tutorial. Part 3, net req, fetch Should I continue? what way?

joaquinelio avatar Jan 28 '25 20:01 joaquinelio

One will use .any, the other one .all ?

easy, done. image

But if I finish the killing of the horses in favor of fetch, it'll be a new branch. the fetch sketch branch looks itchy. What should I fetch() ?

joaquinelio avatar Jan 30 '25 02:01 joaquinelio

Sorry for the delay, I just saw that the task needs a more serous consideration.

Surely we don't need duplicate tasks.

iliakan avatar Jan 30 '25 16:01 iliakan