The temperature 🌡️ conversion app convert's degrees to any type of temperature measurement and returns it conversion. What this project does
- It to take a number as input for the degree you want to convert to.
- A filter that determine what you want to convert your degree to.
I learn how to convert string decimal number to numbers Example
var num1 = parseFloat("21.427"); // returns 21.427
Lines of code:
- 17 lines of code.
Time to code:
This took about 1 hour to code.
Biggest take away:
converting string number to numbers. I tried to use the parseInt(); to achieve that and it works but the answers will not be accurate, because if the string number is a decimal number it will return an integer. Example
var num1 = parseInt("21.427"); // returns 21
var num1 = parseFloat("21.427"); // returns 21.427
So the best option to take is the parseFloat() to get a better and accurate result.