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:
parent
42076e7424
commit
7d76ea8058
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue