JSFiddle - React, Tailwind, and code Playground
HTML
<script id="s1">
let srcpt1 = document.currentScript;
fetch("https://api.sampleapis.com/coffee/hot")
.then(resp => resp.json())
.then(data => srcpt1.outerHTML = `<p><i>${data[0].title}</i></p>`);
</script>
<p>Content between scripts</p>
<script id="s2">
console.log('bb', document.currentScript);
</script>