Can we close a Journey Programmatically?

Journeys include a close button the user can click, but you may want to close the Journey with a timeout, or via some other user interaction with your web app.
In this case, closing the Journey is very simple by calling:

javascript branch.closeJourney(function(err) { console.log(err); });