JSFiddle - React, Tailwind, and code Playground

by Ravindra Athreya

HTML

<div id="addData">

</div>

JavaScript

fetch('https://jsonplaceholder.typicode.com/todos/1')
.then(response => response.json())
.then((mydata) => {
const title = mydata.title;
const addText = document.getElementById('addData');
addText.textContent += title;
});


fetch('http://anyURl')
.then(response => response.json())
.then((data) => {
	console.log(data)
});