title: Correct Usage Of External JavaScript in Blogger
body: <p>I have created a javascript file in github </p>
  
  <p>The code in the js file is as follows : </p>
  
  <pre><code>function youTube(a,b,c,d)
  {
   return ("&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+a+"' width='210'/&gt;&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+b+"' width='210'/&gt;&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+c+"' width='210'/&gt;&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+d+"' width='210'/&gt;");
  }
  </code></pre>
  
  <p>I used rawgit.com to create a CDN link and put it in script source(src)<br>
  And in Blogger>>Edit HTML, at the appropriate place where I wanted it I put the code : </p>
  
  <pre><code>&lt;script src='https://cdn.rawgit.com/example/CTGod/1bc76937/youtubebar.js' type='text/javascript'&gt;
  var a="zK5zn44YzKA";
  var b="3d21j6xOejU";
  var c="U8gD0XiOOL4";
  var d="cLnR-L6fNqs";
  document.write(youTube(a,b,c,d));
  &lt;/script&gt; 
  </code></pre>
  
  <p>When I did not use the code that I have right now put in an external js file and used it normally it worked. The code looked like the below :</p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  var a="zK5zn44YzKA";
  var b="3d21j6xOejU";
  var c="U8gD0XiOOL4";
  var d="cLnR-L6fNqs";
  function youTube(a,b,c,d)
  {
    return ("&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+a+"' width='210'/&gt;&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+b+"' width='210'/&gt;&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+c+"' width='210'/&gt;&lt;iframe allowfullscreen='1' frameborder='0' height='140' src='https://www.youtube.com/embed/"+d+"' width='210'/&gt;");
  }
  
  document.write(youTube(a,b,c,d));
  &lt;/script&gt;
  </code></pre>
  
  <p>Now, I want to know why the code ,which when put in external js file doesn't work.<br>
  If I need to change my source of js file tell me where to upload and how to use it the best way.</p>