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