find last string in an array javascript code example
Example 1: javascript get last character in string
var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d
Example 2: how get last array value in javascipt
arr.slice(-1)[0]
var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d
arr.slice(-1)[0]