let batorzsido = false;

let myPromise = new Promise((resolve, reject) => {
    setTimeout(() => {
        if(batorzsido){
            resolve("Ez a zsidó templomban is fingik");
        }
        reject("Ez a zsidó nem fingik a templomban");
    }, 2000);
})

//setTimeout(asd, 3000);

function asd(){
    myPromise.then(result => {console.log(result);}).catch(error => {console.log(error);});
}

asd();
