title: What is the best performance between inline Javascript code and pure Javascript code?
body: <p>This is a piece of code which is normally used by the majority of programmers:</p>
  
  <pre><code>&lt;input type="text" id="myID" onchange="myFunction()" /&gt;
  &lt;script&gt;
       function myFunction (){
            //DO THIS
       }
  &lt;/script&gt;
  </code></pre>
  
  <p>But in my case I prefer to create a file with <code>.js</code> extension that contains only Javascript and <code>.html</code> that contains only HTML. So in my <code>index.html</code> I have this line:</p>
  
  <pre><code>&lt;input type="text" id="myID"/&gt;
  </code></pre>
  
  <p>And in <code>main.js</code> I have this line:</p>
  
  <pre><code>function myFunction (id){
        $(id).change({
             //DO THIS
        });
   }
  
   myFunction("#myID");
  </code></pre>
  
  <p>The two methods are the same and do the same thing, but what is the best? What is the best performance between inline Javascript code and pure Javascript code?</p>