Hello. In the following lesson about JavaScript Promises:
It says:
“The then method is executed immediately after your promise is fulfilled with resolve”
I think this statement might be inaccurate, right? The then method is just executed when it is called. You can call .then() on a Promise before the Promise is fulfilled. The callback function passed to .then() won’t execute until the Promise is fulfilled, but .then() itself can execute before the promise resolves, right?
My understanding is that .then() adds the callback function passed to it to a queue of callbacks that are executed after the Promise is fulfilled.
Please let me know if there is something I am misunderstanding. Thanks in advance!