Tips
Retrieve a substring from the end in JavaScript

To extract a substring from the end of a string in JavaScript, you can use a regular expression to get the characters starting from the position which is the length of the string minus the length of the desired substring.

Read more

photo by:Justin Kauffman