created two function that takes a parameter

use the conversion formula to convert from fahrenheit to celsius and from celsius to fahrenheit
This commit is contained in:
Isah Jacob 2022-10-31 17:25:11 +01:00
parent 8c96eb988d
commit 9290e3502c
1 changed files with 8 additions and 6 deletions

View File

@ -1,11 +1,13 @@
const ftoc = function() {
const ftoc = function(f) {
return Math.round((f - 32) * (5/9))
}
const ctof = function(c) {
return Math.round(((c * 9/5) + 32))
}
};
const ctof = function() {
};
ftoc(32)
ctof(0)
// Do not edit below this line
module.exports = {
ftoc,