Domanda di colloquio di Rangle.io

Write a recursive function in javascript on whiteboard. How to implement boilerplate functions.