i wrote a simple php script, which i then had to turn into a javascript, it's not working.
i'm unsure when to put "var" in front of a variable in javascript.
can someone tell me what i'm doing wrong, thanks.
-
<script language="javascript1.2">
-
-
document.write("<b>Celcius to Farenheit</b><br>");
-
-
function getF(x)
-
{
-
var convert = x * 1.8 + 32;
-
return convert;
-
}
-
-
var i=0;
-
-
while(i<=100) {
-
result=getF(i);
-
document.write "i - result <br>";
-
i=i+1;
-
}
-
-
</script>
-