ДВ
Size: a a a
ДВ
ЛХ
ЛХ
ДВ
.then()
AS
AS
AS
ЛХ
undefined is not iterable (cannot read property Symbol(Symbol.iterator))
ЛХ
KS
ЛХ
ЛХ
KS
I
I
const getXhrData = (url) => {
let data;
const xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status !== 200) {
console.log(xhr.status);
} else { data = JSON.parse(xhr.response); }
}
};
return data;
xhr.send();
}
I
} else {
data = JSON.parse(xhr.response);
renderData(data)
I
function renderData (data) {
data.titles.forEach((movie) => {
IK
S
const getXhrData = (url) => {
let data;
const xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status !== 200) {
console.log(xhr.status);
} else { data = JSON.parse(xhr.response); }
}
};
return data;
xhr.send();
}
I