Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get last letter of string javascript

// Get last n characters from string
var name = 'Shareek';
var new_str = name.substr(-5); // new_str = 'areek'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #letter #string #javascript
ADD COMMENT
Topic
Name
4+2 =