javascript get last character in string

JavaScript
var hello = "Hello World";
var lastCharOfHello=hello.slice(-1);//d
Source

Also in JavaScript: