Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get last word in string js

function test(words) {
    var n = words.split(" ");
    return n[n.length - 1];
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #word #string #js
ADD COMMENT
Topic
Name
2+3 =