I'm working on a Celsius to Fahrenheit function in JavaScript and I wrote this code:
<!DOCTYPE html>
<html>
<head>
<title>Celius to Fahrenheit Converter</title>
</head>
<body>
<script type="text/javascript">
alert("Welcome");
function tempConverter() {
var degCent = prompt("Enter the degrees in Farenheit", 50)
var degFahren;
degFahren = 9/5 * (degCent + 32);
alert(degFahren);
}
tempConverter();
</script>
</body>
</html>
I tried using 50 as the default value and when i converted it shows 9057.6 instead of 122. Any Ideas?