Function Find Answers Javascript Substring From Right