title: Get element inside element by class and ID - JavaScript
body: <p>Alright, I've dabbled in JavaScript before, but the most useful thing I've written is a CSS style-switcher. So I'm somewhat new to this. Let's say I have HTML code like this:</p>
  <pre><code>&lt;div id=&quot;foo&quot;&gt;
      &lt;div class=&quot;bar&quot;&gt;
          Hello world!
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>How would I change <code>Hello world!</code> to <code>Goodbye world!</code>?</p>
  <p>I know how <code>document.getElementsByClassName</code> and <code>document.getElementById</code> work, but I would like to get more specific. Sorry if this has been asked before.</p>