SyntaxFix
Write A Post
Hire A Developer
Questions
There's a one-liner for everything. :)
var output = input.split(/[, ]+/).pop();