Capital One Interview Question

Case interview consisted of explaining a simple JavaScript function