title: How to import js file from src file into index.html?
body: <p>I am creating one system using React and I am still new to React. I need to add js file in my index.html where that js file is located in the src folder. I need to import this js file in order to make my system works. Does anyone know how to solve my problem? Thanks in advance.</p>
  
  <p>This is how I import my js file. I think there is something wrong with my path. Does anyone know the correct path to import my js file?</p>
  
  <pre><code>      //index.html    
        &lt;!DOCTYPE html&gt;
         &lt;html lang="en"&gt;
          &lt;head&gt;
           &lt;meta charset="utf-8" /&gt;
           &lt;link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /&gt;
           &lt;meta name="viewport" content="width=device-width, initial-scale=1" /&gt;
           &lt;meta name="theme-color" content="#000000" /&gt;
           &lt;link rel="manifest" href="%PUBLIC_URL%/manifest.json" /&gt;
           &lt;title&gt;React App&lt;/title&gt;
           &lt;/head&gt;
           &lt;body&gt;
             &lt;noscript&gt;You need to enable JavaScript to run this app.&lt;/noscript&gt;
             &lt;div id="root"&gt;&lt;/div&gt;
             &lt;script src="http://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"&gt;&lt;/script&gt;
             &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"&gt;&lt;/script&gt;
             &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"&gt;&lt;/script&gt;
             &lt;script src="https://unpkg.com/@coreui/coreui/dist/js/coreui.min.js"&gt;&lt;/script&gt;
             &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.5.0/Chart.min.js" crossorigin&gt;&lt;/script&gt;
             &lt;script type="text/javascript" src='../src/js/index.js'&gt;&lt;/script&gt;
           &lt;/body&gt;
          &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/cZjWa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cZjWa.png" alt="index.js is located under src folder."></a></p>
  
  <p>As you can see from the picture above, my index.js is located under the src folder.</p>