I'm looking at the following code here:
cache[cacheKey] = new Promise(async(resolve) => { ...
Why is async
added before the function? What's the difference between:
cache[cacheKey] = new Promise((resolve) => { ...
I'm looking at the following code here:
cache[cacheKey] = new Promise(async(resolve) => { ...
Why is async
added before the function? What's the difference between:
cache[cacheKey] = new Promise((resolve) => { ...