Use Environment Variable In String Javascript Substring From Right