Bash Exit Function Javascript Example