{{newin|[[0.8.0]]|080|type=function}}
Adds the quit event to the queue.

The quit event is a signal for the event handler to close LÖVE. It's possible to abort the exit process with the [[love.quit]] callback.

== Function ==
=== Synopsis ===
<source lang="lua">
love.event.quit( exitstatus )
</source>
=== Arguments ===
{{New_feature|0.10.0|
{{param|number|exitstatus (0)|The program exit status to use when closing the application.}} }}
=== Returns ===
Nothing.

== Function ==
{{newin|[[0.10.2]]|102|type=variant}}
Restarts the game without relaunching the executable. This cleanly shuts down the main Lua state instance and creates a brand new one.
=== Synopsis ===
<source lang="lua">
love.event.quit( "restart" )
</source>
=== Arguments ===
{{param|string|"restart"|Tells the default [[love.run]] to exit and restart the game without relaunching the executable.}}
=== Returns ===
Nothing.

== Example ==
<source lang="lua">
function love.keypressed(k)
   if k == 'escape' then
      love.event.quit()
   end
end
</source>
== See Also ==
* [[parent::love.event]]
* [[love.quit]]
[[Category:Functions]]
{{#set:Description=Exits or restart the LÖVE program.}}
{{#set:Since=080}}
== Other Languages ==
{{i18n|love.event.quit}}