Predict the output of the following snippet.
setTimeout(() => console.log(1)); Promise.resolve().then(() => console.log(2)); console.log(3);