Uncaught TypeError: Cannot read properties of null (reading 'value')
f(x) {
let gold = document.getElementById("GOLD").value;
return gold;
}
<input type="text" id="GOLD">
как исправить Uncaught TypeError: Cannot read properties of null (reading 'value')