Javascript Function Example Problems In Equation