You can just use less than and greater than symbols. Then, you won't even need to use `!isNaN(...)`

because NaN isn't bigger or smaller than anything and will always return false.

Also, I made parseInt use base-10 for you. Just in-case any weird stuff happens.

Code:

function inRange(n) {
// easily change the min/max values here
var min = 1;
var max = 99;
return n >= min && n <= max;
}
function totalCost() {
//declare variables
var snicker = parseInt(document.getElementById("snicker").value, 10);
var twix = parseInt(document.getElementById("twix").value, 10);
var chips = parseInt(document.getElementById("chips").value, 10);
var salesTax = 0.05;
var total = 0;
if ( inRange(snicker) ) {
total += snicker * .59;
}
if ( inRange(twix) ) {
total += twix * .49;
}
if ( inRange(chips) ) {
total += chips * .39;
}
total += salesTax * total;
if (total > 0) {
alert("The total is " + total);
return false;
} else {
alert("Invalid total cost, please make a selection");
}
}