The instructions say:
Type Ctrl + O to save the file.
Press Enter to write the filename.
Type Ctrl + X to exit.
Finally, type clear to clear the terminal window.
When you get to
Type Ctrl + X to exit, this should be taking you out of Nano.
Then, once you've exited from
nano and you're back in the terminal, you can type
clear and that should work.