Answers for "get last few characters of string javascript"

30

javascript substring last character

var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d
Posted by: Guest on August-01-2019
0

last five characters of string javascript

var hello = "Hello World";

var last5 = hello.slice(-5);

alert(last5); // "World"
Posted by: Guest on June-28-2021

Code answers related to "get last few characters of string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language