JavaScript chainging on the example of a simple calculator.