ARTICLE AD BOX
You can’t “call constants back to HTML”. JavaScript must read values after user input and update the DOM.
Your code also has casing errors and runs too early.
function getValues() { const a = document.getElementById('a_value').value; const b = document.getElementById('b_value').value; const c = document.getElementById('c_value').value; document.getElementById('result').textContent = `a=${a}, b=${b}, c=${c}`; }Call the function from HTML (e.g., button click):
<button onclick="getValues()">Get values</button> <p id="result"></p>Key point: HTML doesn’t access JS variables; JS updates HTML via the DOM.
