function solve(){
const xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("data").innerHTML = xhttp.responseText;
}
};
xhttp.open("GET", "https://cors-anywhere.herokuapp.com/https://tiny-news-api.herokuapp.com/api/news", true);
xhttp.send();
}
solve()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter