I need to take the text of an element from my DOM and pass it to a function. but I get an error on the line below
const status = document.getElementById("word").innerText
the error is : Cannot read properties of null (reading 'innerText')
I am certain that the element with "word" id is not null, I can't find what the problem is or where the null comes from