This is also possible in the first and second Monkey Island games, using hotkeys ctrl+W or maybe alt+W.
The cheat code will immediately end your game while informing you that you scored 800 of 800 points (presumably a Sierra reference; this is the only way to score any number - including zero - of points).
There's no particular reason you'd discover this while playing either game, but if you play the third one, a mandatory plot point will show the message "You lose. You scored 0 of 800 points," referring back to the obscure joke in the earlier games.