Advanced JavaScript Division by zero