ejecuta()
async function ejecuta() {
try {
const r1 =
await Promise.resolve("Hola")
console.log("Éxito 1:", r1)
} catch (e) {
console.
log("Falló 1:", e.message)
}
try {
const r2 = await Promise.reject(
new Error("ouch"))
console.log("Éxito 2", r2)
} catch (e) {
console.
log("Falló 2:", e.message)
}
}