Pregunta de entrevista de Rangle.io

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