Can someone take a look at this and tell me why this does not work. It does not make it all the way thru the function.
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
<html>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1”>
<title>Untitled Document</title>
<script type="text/javascript">
function cabFair(start, end, time){
var base = 0;
if (start = 1){
if (end = 1){
base = 5;
}if (end = 2) {
base = 7;
}base = 8;
}if (start = 2){
if (end = 1){
base = 7;
}if (end = 2) {
base = 5;
}base = 9;
}if (end = 1){
base = 8;
}if (end = 2) {
base = 9;
}base = 5;
//return(base);
if (time > 20){
time1 = (time - 20);
time2 = (time1 * (.3));
finalTime = (time2 + 10);
}if (time > 10 && time <= 20){
time1 = (time - 10);
time2 = (time1 * (.4));
finalTime = (time2 + 6);
}if (time >4 && time <= 10){
time1 = (time - 4);
time2 = (time1 * (.5));
finalTime = (time2 + 3);
}finalTime = (time * .75);
var fare = finalTime + base;
return fare
}
</script>
</head>
<body>
<script type="text/javascript">
//Ask user for input
var start = parseInt(prompt(“Enter the Starting Point”, “1”));
var end = parseInt(prompt(“Enter the Ending Point”, “2”));
var time = parseInt(prompt(“Enter the Total Time”, “4”));
//output for information
document.writeln(cabFair(start, end, time)
+ " Is the Total Fare.");
</script>
</body>
</html>