exit()
Quits/stops/exits the program and closes the program window.
Examples

require("L5")
function setup()
size(100, 100)
windowTitle('exit() example')
fill(0)
text("Press to quit.",10,height/2)
describe('A window advising to click to quit.')
end
function mousePressed()
exit()
end
Related
This reference page contains content adapted from p5.js and Processing by p5.js Contributors and Processing Foundation, licensed under CC BY-NC-SA 4.0.