Ironclad interview question

Had to solve an intermediate code challenge