Error in JavaScript return code?
<p>Here is the javascript code: 
There is an error in code where nightSurcharges is added to total cost even if pickUptime is less than 20.</p>

<pre><code>function TaxiFare() {

    var baseFare = 2;
    var costPerMile = 0.50;
    var nightSurcharge = 0.50; // 8pm to 6am, every night //its flat 0.50 and not per mile
    var milesTravelled = Number(document.getElementById("miles").value) || 0;
    if ((milesTravelled &lt; 1) || (milesTravelled &gt; 200)) {
        alert("You must enter 1 - 200 miles");
        document.getElementById("miles").focus();
        return false;
    }

    var pickupTime = Number(document.getElementById("putime").value) || 0;
    if ((pickupTime == "") || (pickupTime &lt; 0) || (pickupTime &gt; 23)) {
        alert("The time must be 0-23 hours");
        document.getElementById("putime").focus();
        return false;
    }

    var cost = baseFare + (costPerMile * milesTravelled);

    // add the nightSurcharge to the cost if it is after
    // 8pm or before 6am
    if (pickupTime &gt;= 20 || pickupTime &lt; 6) {
        cost += nightSurcharge;
    }
    alert("Your taxi fare is $" + cost.toFixed(2));
}
</code></pre>

<p>I want nightSurcharge to be added only when pickupTime is >=20, but that's not working right now.
Any help is appreciated. Thanks</p>
