In javascript, how would I do this rfind?
<pre><code>www.mydomain.com/invite/abc123
</code></pre>

<p>I want the function to return "abc123". The logic goes like this:</p>

<pre><code>If there is a forward slash, then take all characters after the last forward slash.
</code></pre>

<p>In python, I write it like this: </p>

<pre><code>if s.find('/') &gt;= 0:
    return s[s.rfind('/')+1:]
</code></pre>

<p>But how do I do this in javascript?</p>
