title: Python code inside javascript is not recognized for visual studio code
body: <p>I have some JS code inside an HTML file as <code>&lt;script&gt;&lt;/script&gt;</code>, but the back end calculations are made by python, in <strong>pycharm</strong>, this py code is recognized and working well, but in vs code is detected as an issue:</p>
  
  <blockquote>
    <p>'(' expected. <em>js</em></p>
  </blockquote>
  
  <p>My question is, why is VS code detecting this as an error and how can I fix it?</p>
  
  <pre><code>&lt;script&gt;
      document.getElementById("switch").style.visibility = "hidden";
      document.getElementById("stay").style.visibility = "hidden";
  
          {% if error %}             #this code is python, not JS
              alert('{ error }')
          {% endif %}
  
      var clicked = false;
      var randomize = Math.random(1,4);
  
      function shuffle(array) {
          var currentIndex = array.length, temporaryValue, randomIndex;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hXwkz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hXwkz.png" alt="VS code screen"></a></p>