Keystroke: ⌘ + Q
This menu item closes down the program.
However, if you have any files open which you have not saved, a dialog appears for you to save your work. Note that you are prompted with this dialog separately for each open unsaved file.
The file save dialog gives you three choices: