PayPal interview question

Recursive programming question in react.