Can anyone tell me what is wrong with the following script? It is not working when I open the browser. Can anyone help?
<br />var income, age, mStatus, nbrOfChildren;<br /><br />//read in the variables<br />income = prompt ("Enter income", "0" );<br />age = prompt("Enter age", "0" );<br />mStatus = prompt ("Enter marriage status", "0" );<br />nbrOfChildren = prompt ("Enter number of children", "0" ) ;<br /><br />//convert from strings to integers<br />income = parseInt(income);<br />age = parseInt (age);<br />mStatus = parseint(mStatus);<br />nbrOfChildren = parseInt(nbrOfChildren);<br /><br />A = 0;<br />B = income*(0.1-0.01*nbrOfChildren);<br />C = income*(0.07);<br />D = income*(0.12);<br /><br />if(income < 20000) {<br />document.writeln ("Tax is equal to" + zero);<br />}<br /><br />else if (age >=85) {<br />document.writeln ("Tax is equal to" + zero );<br />}<br /><br />else if (income >20000 && age < 85 && mStatus = "Married" && nbrOfChildren <= 3) {<br />document.writeln ("Tax is equal to" + B );<br />}<br /><br />else if (income >20000 && age < 85 && mStatus = "Married" && nbrOfChildren > 3) {<br />document.writeln ("Tax is equal to" + C );<br />}<br /><br />else {<br />document.writeln ("Tax is equal to" + D );<br />}<br /><br />