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'
 
PREVIOUS NEXT
Tagged: #letter #string #javascript
ADD COMMENT
Topic
Name
7+6 =