Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

last five characters of string javascript

var hello = "Hello World";

var last5 = hello.slice(-5);

alert(last5); // "World"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #characters #string #javascript
ADD COMMENT
Topic
Name
7+4 =