title: How do I remove setInterval from progress bar in Javascript and make appear the VerticalBar instantaneously?
body: <p>I have the classical Progress bar in Javascript. I Would like to simply place the vertical bar without seeing it moving on the screen.</p>
  <pre><code>function progressbar() {
        var vertical_bar2 = document.querySelector(&quot;#P5 .vl5&quot;);
        var element = document.getElementById(&quot;myprogressBar&quot;);
        var ValueSet = 25
        var width = 0;
      
        document.getElementById(&quot;vl5&quot;).style.display='';
        document.getElementById(&quot;value2&quot;).style.display='';
        document.getElementById(&quot;value1&quot;).style.display='';
        var identity = setInterval(scene, 10);
      
        function scene() {
          if (width &gt;= ValueSet) {
            clearInterval(identity);
          } else {
            width++;
            vertical_bar2.style.left = `${width}%`;
            document.getElementById(&quot;value2&quot;).innerHTML = ValueSet
          }
        }
      }
  </code></pre>
  <p>I am trying the following script but it is not working</p>
  <pre><code>function progressbar() {
        var vertical_bar2 = document.querySelector(&quot;#P5 .vl5&quot;);
        var element = document.getElementById(&quot;progressBar&quot;);
        var CE = 25
        var width = 0;
        document.getElementById(&quot;vl5&quot;).style.display='';
        document.getElementById(&quot;Value2&quot;).style.display='';
        document.getElementById(&quot;Value1&quot;).style.display='';
        vertical_bar2.style.left = 25;
        document.getElementById(&quot;Value&quot;).innerHTML = CE
      }
  </code></pre>