I want to make multiple API calls one by one and the second one will be dependent on the result of the first one. What if I lost my internet connection in between each call?
Example:
const test1 = async () => {
const var1 = await function1()
// loss of internet connection or browser gets shut down
const var2 = await function2(var1)
}
Will var2 get executed or will it have expected result returned to me? If not, what are the workarounds to make sure two calls get executed?