Simple Javascript calculator for calculating how much gas spent