Question: what is the difference between exit and return?
Answer: return returns from the current function; it's a language keyword like for or break . exit() terminates the whole program, wherever you call it from.