8000 My solution to the two tempConversions functions · CarlBrough/javascript-exercises@1a863ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a863ff

Browse files
committed
My solution to the two tempConversions functions
1 parent 4a24293 commit 1a863ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tempConversion/tempConversion.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const ftoc = function() {
2-
1+
const ftoc = function(fahrenTemp) {
2+
return ( Math.round(((fahrenTemp - 32) * 5 / 9) * 10) / 10);
33
}
44

5-
const ctof = function() {
6-
5+
const ctof = function(centiTemp) {
6+
return ( Math.round ((centiTemp * 9 / 5 + 32) * 10) / 10);
77
}
88

99
module.exports = {

0 commit comments

Comments
 (0)
0