here is the pen with all the code
https://codepen.io/maxcream/full/rJyGgo/
Made a simple web page that tells you the price of a maccers or kfc large soda in bitcoin value. Just as Big SMOKE would have wanted.
Golden Nugget
I found that "," (a comma) in a number string will stop it being converted to a Number type within Javascript.
Suprisingly it took me a while to figure out it was a comma in the string that wasn't allowing me to convert a string into a number via the parseFloat() method.
Turns out it must be an illegal character and it doesn't just ignore them like i assumed it would. So to sum up i just replaced the "," in the string with the .replace(",", "") method to replace the comma in the string with nothing, in other words deleting it. Then i was able to convert into a number to do some QUICKMATHS.
check out the codepen link if you want to see it in more detail or edit it yourself...