javascript: calculate two numbers