My understanding is that javascript is single-threaded, meaning it will only execute one line at a time.
For the following code, why is 'await' necessary? I think it will still execute fetch before it moves to the next line:
const res = await fetch('http://testurl.com');
Can someone explain the importance of await in single-thread languages?
Thank you