Skip to content

Commit 9ff01a3

Browse files
author
highflyer910
committed
Celsius to Fahrenheit
1 parent 9a4e19b commit 9ff01a3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

convertof.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function convertToF(celsius) {
2+
var fahrenheit = (celsius * (9 / 5)) + 32;
3+
if ( typeof fahrenheit !== 'undefined' ) {
4+
return fahrenheit;
5+
} else {
6+
return 'fahrenheit not defined';
7+
}
8+
}
9+
10+
convertToF(30);

0 commit comments

Comments
 (0)