get the last char in a string js code example Example: javascript last character of string var lastChar = myString[myString.length -1];