Having the usual fake api fetch request and call console.log() immediately.
const url = "https://jsonplaceholder.typicode.com/users";
const promise = fetch(url);
console.log(promise);
That returns the following:
Promise {<pending>} [[PromiseState]]: "fulfilled"
The question is: How do we already know (in synchronous console.log() operation) the state of the promise is fulfilled or rejected? And why the promise is pending and fulfilled at the same time?