1
0
Fork 0
nyazoom/dist/scripts/cat_fact_fetcher.js

6 lines
152 B
JavaScript

fetch("https://catfact.ninja/fact")
.then(data => data.json())
.then(data => {
document.getElementById("cat-fact").innerHTML = data.fact;
});