Middle
What happens if I use await on a value that is not a Promise?
sobes.tech AI
Answer from AI
The value will be synchronously converted to a Promise (Promise.resolve(value)), and await will wait for its "resolution," which will happen immediately. The subsequent code will execute immediately after this conversion. In fact, await does not affect the execution flow, except for the type conversion, if the value is not a Promise.