How to find the last character of a string in JavaScript?
Updated
•1 min readIn order to get the last letter of a string in JavaScript, you can subtract one from the string's length.
var firstName = "julia";
var lastLetter = firstname[firstName.length - 1]; // output: a
