title: not defined at HTMLInputElement.onkeyup
body: <p>This is my code:</p>
  
  <pre><code>&lt;h2&gt;&lt;/h2&gt;
  &lt;input type="text" onkeyup="titleb(this.value)"&gt;
  &lt;script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script&gt;
      (function($){
          function titleb( title ) {
              $('h2').html(title);
          }
      })(jQuery)
  &lt;/script&gt;
  </code></pre>
  
  <p>It supposed to take the input text and add it to the h2... but what I'm getting instead is:</p>
  
  <pre><code>Uncaught ReferenceError: titleb is not defined
      at HTMLInputElement.onkeyup
  </code></pre>