Message from JavaScript discussions

April 2017

— And its better no to use Sync versions


The promise is created, runs it's callback, then yields to next highest context. then is run after resolve is run but only after that next highest context is finished

— There is not new Promise alternative pattern

— Keep in mind those do not exist in regular js promises

— So the construct has highly varying uses between node vs browser js

— You will find completely different uses between them

— Yes, this is the last playground I used and give me the light, DO NOT RUN IT, It will block the REPL.

Promise.resolve().then(() => {
setTimeout(() => console.log('Time is out'), 100)

Message permanent page

— Hehe

— Because before I used the new Promise, and I had the power to cancel, but i'm not in power after the .then runs in the next tick

Message permanent page

— Lmao. I learned a lot today.

— Just came up with a way to use yield to detect cyclic graphs

— Allows the entire call stack to pause, exchange information, and resume