odin-default-js-exercises/tempConversion/tempConversion.js

14 lines
251 B
JavaScript
Raw Normal View History

const convertToCelsius = function() {
return Math.round((f - 32) * (5/9) * 10) / 10;
};
2017-08-25 15:27:07 +00:00
const convertToFahrenheit = function() {
2022-01-23 20:17:39 +00:00
return Math.round(((c * 9/5) + 32) * 10) / 10;
};
2017-08-25 15:27:07 +00:00
2017-08-25 15:27:07 +00:00
module.exports = {
convertToCelsius,
convertToFahrenheit
};