I've written code that runs a long calculation in which, as part of it, several UI elements are updated showing part of the progress and results of the calculations. I would like to make possible for the user to run more than one calculation at the…
I am having two codes related to promises..the logic is same...but producing different outputs why?
code 1
const is_shop_open = true;
const order = (time,work)=>{
return new Promise((resolve,reject)=>{
if(is_shop_open===true){
…