Ant International interview question

implement chain calls in javascript for a calculator