How can i get file extensions with javascript?
<p>See code: </p>

<pre><code>var file1 ="50.xsl";
var file2 =30.doc";"
getFileExtension(file1); //returs xsl
getFileExtension(file2); //returs doc

function getFileExtension(filename) {
/*TODO*/
}
</code></pre>
