Need some Javascript help. Here is some code that reads a text file (Current-Week.txt) with a single record and then appends the contents of that record on the end of another filename. It then reads the concatenated filename (e.g. Standings-Week3.htm) into my page as html.
I can’t seem to get this to work
<script>
async function loadHtml() {
const weekFile = await fetch("Current-Week.txt")
const weekNbr = await respones.text()
const fileName = "Standings-Week" + weekNbr
const response = await fetch(fileName)
const text = await response.text()
document.getElementById('elementID').insertAdjacentText('beforeend', text)
}
loadHtml()
</script>
<div id='elementID'> </div>