=> {
text = parser.parseFromString(data, 'text/xml');
});
}
console.log(text);text is always undefined outside of the asyn call chain even when i am using await, is there any way to assign it properly ??
You are logging it before you assign it, JavaScript does not run top to bottom
return the fetch and do: getDate().then(console.log)
Обсуждают сегодня