btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}
btnSlow.onclick = () => getUserInfo(1);
const getUserInfo = async (id) => {
try {
let res = await fetch('user')
const user = await res.json()
content.innerHTML = 'User info'
res = await fetch('posts')
const posts = await res.json()
content.innerHTML += `${posts}`
res = await Promise.all(
posts.map(p => fetch('comm'))
)
const comments = await Promise.all(
res.map(r => r.json())
)
document.posts.forEach(p => {
p.innerHTML += comments
})
} catch(err) {
console.error(err)
}
}