title: How to get the input Range value and pass it to the value outside scope?
body: <p>Here's my Question</p>
  <p>HTML</p>
  <pre><code>&lt;input type=&quot;range&quot; onchange=&quot;price(this.value)&quot;&gt;
  </code></pre>
  <p>JS</p>
  <pre><code>let priceRange = 0;
  
  function price(value) {
      console.log(value);
      priceRange = value;
  }
  
  console.log(value);
  </code></pre>
  <p>Here I can access the input Range value inside the scope and store it in priceRange and log it, but not outside the scope, is there any solution for accessing the variable priceRange with the value of the input range value?</p>
  <p>Any solutions would be appreciated!</p>