https://tutorial.eyehunts.com/js/get-last-character-of-string-javascript-example-code/
Get last character of string JavaScript | Example code