I can say I’ve completed it, because it meets the 2-3 criteria, but I still think it could be a a lot better, meaning the design and the code as well.
So I am very open for any suggestions / advice / critics helping to fine tune it.
Here it is:
Many questions came to mind while making it, but these 2 are the most prominent ones:
-
I still don’t really understand how we can make functions work together. -> as you see I wrote almost everything into 1 bigger function, but it would be easier to understand if, for ex. the eventlister of the C/ F button, or even the one of the two getJSONs would be written separately. am I right ?
-
A strange thing : when console.log-ing the innerHTML of the °C and ℉ signs it doesn’t log the ℃ or ℉ values - I used JSBin -, but the signs themselves.
Equally, when putting : if(element.innerHTML === “℃”) it doesn’t evaluate to true, even though the element’s innerHTML was °C.
And when I put: if(element.innerHTML === “°C”) , it evaluated to true. the same element.
you can see it in my code too. So this is strange for me, maybe someone has an explanation. I use Google Chrome.