Answers for "javascript getposts getcomments"

1

javascript getposts getcomments

const run = document.getElementById("run");

    run.addEventListener("click", () => {
        lib.getPosts(callbackPost);

        function callbackPost(err, articles) {
            articles.forEach((art) => {
                lib.getComments(art.id, callbackComm);

                function callbackComm(err, comms) {
                    comms = art.comments;
                    console.log(art);
                }
            });
        }
    })
Posted by: Guest on November-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language