Pass javascript variable from index.js into index.html :  This is my index.js file 

     function fun()
    {
     var obj;
     }

This is my  index.html()
 
      <script>
      src="js/index.js"
      </script>
     I want to use variable obj here

I saw some solutions to create a variable and pass in index.html but is there any way of injection?

