Result = value > bottom_range && value < top_range
bottom_range = prompt (); top_range = prompt ();
how is that the best solution (implies it is better than Mr Chad's solution). when it detects val > a to be false it doesn't even go on with value < b, it is unnecessary to do all the low level optimization.
it's the same...
Slight update, it does work with a prompt, but it displays the wrong results for example the result will show 12500 is Greater than 10, but less than 50,000
Similarly if I input 10 as the bottom and 1000 as the top no results will be displayed.
These problems only occur when prompting for the values?
Suggestions?
Do a parseInt() on the values returned from the prompt when doing the compare. You'll want some validation to ensure the user enters a numeric value.