javascript split undefined array
<pre><code>var ar= [];
ar[0] = 'abc|def';
ar[1] = ['www|aaa', 'bb|cct', 'oo|kopp'];

for(var i=0; i&lt;ar[1].length; i++) {
    var f = ar[1][i].split['|'];
    alert(f[0]); //error f is undefined 
}
</code></pre>

<p>Why there is error on split function? I am new to javascript.</p>

<p>Thanks.</p>
