end code nodejs

JavaScript
process.exit()
Source

Also in JavaScript: