How to pass value of an input range to a variable in JS?
<p>How do you get the value of an input range slider into a variable?  Below is the range I'm using. Suppose I drag the range to 12, then I need "12" as the variable that I want to then pass to a function.  </p>

<pre><code> &lt;input type="range" min="1" max="30" value="15" /&gt;
</code></pre>

<p>Edit: I don't want a button to confirm the value or something, I want that everytime the value is changed, it gets passed to the function, so it'll be dynamic!</p>

<p>PS: It may not be the best question out there, but I've honestly tried looking for an answer before posting the question.</p>