Как вывести переменную с кода JS на сайт HTML

<script>
  let a = Math.floor(Math.random() * (100 - 0 + 1)) + 0;
  let b = Math.floor(Math.random() * (100 - 0 + 1)) + 0; 

  document.getElementById('numA').innerHTML = a;
  document.getElementById('numB').innerHTML = b;
  let correctAnswer = a + b
  document.getElementById("correctAnswer").textContent = correctAnswer;

</script>
<form id="myForm">
  <span <div id="numA"></div></span> + <span <div id="numB"></div></span> = ?
  <p id="result"></p>
  <label>Ответ:</label>
  <input type="number" id="answer" placeholder="...">
  <p></p>
  <input type="submit" onclick= 'check_answer()' value ="Отправить">
</form>

Ответы (0 шт):