hey just wondering, as the topic suggests, what the command is to terminate your program?

say you have a menu, with 3 options
1.play
2.settings
3.quit

when the user selects option 3, my game just kinda.. crashes. but not in a bad way. everything just stops. it doesnt actually close the window. here is how my code works in theory:

var option = 0

function main()
{
while(option != 3)
{
print all 3 menu options;
get user input and store it in the variable "option";
}
}


HURRR DERP DERP DEERRPP HURR