string.split('/') not giving proper array
<p>I'm having an issue with the following script.
The calling script is:
script src="//192.168.6.10/js/cYJIeCa30E.js
the resulting script needs to be parsed for cYJIeCa30E.js 
in this script I have:</p>

<pre><code>var scripts = document.getElementsByTagName('script');
var lastScript = scripts[scripts.length-1];
var scriptName = lastScript.src;

var name = scriptName.split('/');
alert(name);
</code></pre>

<p>alert(name) gives comma separated values:</p>

<pre><code>http:,,192.168.6.10,js,cYJIeCa30E.js
</code></pre>

<p>but</p>

<p>alert(name[4]) gives ':' not the value after the last '/'</p>

<p>any idea what I am missing?</p>

<p>Thanks</p>