odin-default-js-exercises/07_tempConversion/solution/tempConversion-solution.js

13 lines
212 B
JavaScript
Raw Normal View History

2022-02-20 19:07:44 +00:00
const ftoc = function (f) {
return Math.round((f - 32) * (5 / 9) * 10) / 10;
};
const ctof = function (c) {
return Math.round(((c * 9) / 5 + 32) * 10) / 10;
};
module.exports = {
ftoc,
ctof,
};