Answers for "how to display api data in html"

0

how to display api data in html

const p = document.getElementById("myPelement")
fetch('http://example.com/movies.json')
    .then((response) => {
        return response.json();
    })
    .then((data) => {
        p.innerText = data
    });
Posted by: Guest on June-06-2021

Code answers related to "how to display api data in html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language