get last char javascript

JavaScript
var lastChar = myString[myString.length -1];myString.substr(-1);
Source

Also in JavaScript: