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 javascript.plainenglish.io #
 
PREVIOUS NEXT
Tagged: #characters #string #javascript
ADD COMMENT
Topic
Name
2+5 =