var options;
fetch("https://api.covid19api.com/countries").then(function(response) {
return response.json();
}).then(function(obj) {
options = "jas";
}).catch(function(error) {
alert(error);
});
console.log(options);
The value of "options" variable should be "jas" but in console undefined is showing.Can any one describe what i and doing wrong.
i want to print "jas",what should i do to achieve it? please help me