substring vs charat best way to find last character of string code example
Example: javascript get last character in string
var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d
var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d