Update tempConversion.js

Proposed solution to empty answer template on The Odin Project's Test Driven Development section for tempConversion.js.
This commit is contained in:
Smyrna 2021-04-15 20:18:26 -04:00 committed by GitHub
parent 42076e7424
commit 7d76ea8058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -1,9 +1,13 @@
const ftoc = function() { const ftoc = function(fahrenhite) {
const fTemp = fahrenhite;
const fToCel = Number(((fTemp - 32) * 5/9).toFixed(1));
return fToCel;
} }
const ctof = function() { const ctof = function(celsius) {
const cTemp = celsius;
const cToFahr = Number((cTemp * 9/5 + 32).toFixed(1));
return cToFahr;
} }
module.exports = { module.exports = {