I know jQuery is recommended to write to the DOM, I want to understand how to write to the DOM in Javascript, considering how many programs use Javascript as there language, never know what I want to or need to develope for (maybe a smart phone app in the future) :)
var a = document.getElementById('boxa');
var outputResults = a.getElementById('goat');
outputResults.innerHTML = write("what");
<div id="boxa">
<h1 id = "header">This is an emergency</h1>
<p>what is going on<span id="goat"></span>
</div>
</div>
How come I'm not writting the word "what" within the span ID=goat ?