8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 302b195 commit 05efd9bCopy full SHA for 05efd9b
07_tempConversion/tempConversion.js
@@ -1,9 +1,17 @@
1
-const convertToCelsius = function() {
+const convertToCelsius = function(farenheitDegrees) {
2
+ let celsiusDegrees = (farenheitDegrees - 32) * 5 / 9;
3
+ return round(celsiusDegrees);
4
};
5
-const convertToFahrenheit = function() {
6
+const convertToFahrenheit = function(celsiusDegrees) {
7
+ let farenheitDegrees = (celsiusDegrees * 9 / 5) + 32;
8
+ return round(farenheitDegrees);
9
10
11
+function round(number) {
12
+ return Math.round(number * 10) / 10;
13
+}
14
+
15
// Do not edit below this line
16
module.exports = {
17
convertToCelsius,
0 commit comments