0

How to get value from then and assign it to variables?

const country = new Country();

country
    .getCountry()
    .then((results) => {
        ui.paint(results);
    })
    .catch((err) => {
        console.log(err);
    });

const variable = country.name;
Juno
  • 1

0 Answers0