I clearly remember many of the convrsations early on when JS was released. I was doing web dev prior to it , and its arrival even in a minimal form was much anticipated.
return process.exit()is arguably fine - it ensures developers who aren't familiar with
process.exit()terminating will understand that it's the last line in the function, as would
throw process.exit()- but since it's redundant i'd still suggest omitting the return or throw.
The last statement explains it pretty well:
You dont need static typed language to enforce if a return value exists or not.