SyntaxFix
Write A Post
Hire A Developer
Questions
str.charAt(str.length - 1)
Some browsers allow (as a non-standard extension) you to shorten this to:
str[str.length - 1];