title: Random generator in Javascript with min and max value not working
body: <p>I am new to JavaScript. I am trying to make an exercise program which generates a random number between a min and a max value. I am facing an issue in the program below. <code>var2 + min</code> is not working correctly. If I replace variable min with the actual value, then it works. What am I doing wrong?</p>
  
  <pre><code>var var1=Math.random()
  var min = prompt("Enter Min value:")
  var max = prompt("Enter max value:")
  alert("min is "+min+" max is "+max)
  var var2=var1*(max-min)
  var var3=var2+min
  var var4=Math.floor(var3)
  alert("var1= "+var1+" var2= "+var2+" var3= "+var3+" Var4 "+var4)
  </code></pre>