The basic premise of this app is like a radio that saves stations to certain channels to be recalled when clicked. I keep getting the index.html:111 Uncaught ReferenceError: saveOne is not defined at HTMLButtonElement.onclick (index.html:111) error in the console and also when I mouse over the function in my VSCode i get this error: 'saveOne' is declared but its value is never read.ts(6133)
I've looked everywhere for a while now and can't find any solution or clear explanation as to why it's not working.
Thanks!
//HTML// sorry I'm new to stack overflow ::facepalm:: I assure you the html is accurate, but I don't understand how to get it to work since im a stack overflow noob.
button onclick="" value="90.1" type="button" id="channel1" class="btn btn-secondary">One /button> button type="button" onclick="saveOne()" id="save1" class="btn btn-dark save_btns">Save1 /button>
// JS FILE //
let channel1 = document.getElementById("channel1").value
function saveOne(){
let saveChnl1 = current_station.innerHTML
channel1 = saveChnl1
// console.log(channel1) //100.3
return channel1
}