Onit interview question

Basic JS, React, Recursion