1 const run = document.getElementById("run");
2
3 run.addEventListener("click", () => {
4 lib.getPosts(callbackPost);
5
6 function callbackPost(err, articles) {
7 articles.forEach((art) => {
8 lib.getComments(art.id, callbackComm);
9
10 function callbackComm(err, comms) {
11 comms = art.comments;
12 console.log(art);
13 }
14 });
15 }
16 })