Textio interview question

Explain your code