let condition = false;


let myPromise = new Promise((resolve, reject) => {
    if (condition){
        resolve("JÓÓÓ");
    }
    
    reject("szar");
});

myPromise.then((good) => {console.log(good)}).catch((error) =>{console.log(error)});