This solution is generated by ChatGPT, correctness is not guaranteed.

AI solution for JavaScript Quiz on BFE.dev
2. Promise executor

The code will output "1" to the console. This is because the first call to resolve(1) successfully resolves the Promise with a value of 1, and the subsequent call to resolve(2) is ignored. The reject('error') line is never reached, so the error callback is not executed.