While you’re doing an await for a promise in JavaScript, what is its value before it resolves? Answer: whatever it previously was.

let baz = 'hello world';

const foo = async() => {
  baz = await new Promise(resolve => {
    setTimeout(() => {
     resolve('resolved');
    }, 1000);
  });
};

foo();
baz;  // value is 'hello world' until 1 second, at which point it changes to 'resolved'

Didn’t know this until yesterday. 🤓