Numerical Method Function In Javascript Example