Bugsnag interview question

Watched while coding a basic function and asked about alternative approaches.