Hi friends how are you. I need help i’m confuse understanding js promises this is my code.
const savePromise = fetch(url).then(response => console.log(response)).catch(err => console.log(err)) console.log(savePromise); // promise pending
i want to know that which promise stored in savePromise variable because then return promise and catch also return promise so catch promise is stored in savedPromise variable ? i run code in debugger so i know that first time code also goes to catch which means catch return promise.