split function in javascript
<p>i have an array which contains different values, i want split them off and print in browser. but i want alert it first value. i have made a function but it is not wokring</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function(){
    var jam= new Array("first","second","third","fourth");
    var Klnew= jam.split(",");

    //for(i=0;i&lt;Klnew.length;i++) {}

    alert(Klnew[0])     
});    
&lt;/script&gt;
</code></pre>
