title: Javascript - Fetch array element parameter by function is undefined/null
body: <p>The array element variable parameter fetched by my function is null/undefined?
  Or it is all about the split function?
  Thanks for the help guys! </p>
  
  <p>Error : </p>
  
  <blockquote>
    <p>SCRIPT5007: Unable to get property 'split' of undefined or null reference </p>
  </blockquote>
  
  <p>JavaScript Code:</p>
  
  <pre><code>newData = "1,1,1,1,1/2,2,2,2,2|3,3,3,3,3/4,4,4,4,4";
  
  var arrPage = newData.split('|');
  
  arrRow = arrPage[0].split('/');
  rowCount = arrPage[0].split('/').length;    
  
  for(var i = 0; i &lt;= rowCount; i++){
  
  var rData = arrPage[0].split("/");
  a = rData[i];
  renderTable(a);
  }
  
  function renderTable(rData) {
  
  var cData = rData.split(',');
  
  var c1 = cData[0];
  var c2 = cData[1];
  var c3 = cData[2];
  var c4 = cData[3];
  var c5 = cData[4];
  var c6 = cData[5];
  var c7 = cData[6];
  var c8 = cData[7];
  var c9 = cData[8];
  var c10 = cData[9];
  var c11 = cData[10];
  var c12 = cData[11];
  var rowData = "";
  
  rowData =   "&lt;tr&gt;";
  rowData +=  "&lt;td&gt;"+ c1 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c2 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c3 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c4 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c5 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c6 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c7 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c8 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c9 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c10 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c11 +"&lt;/td&gt;";
  rowData +=  "&lt;td&gt;"+ c12 +"&lt;/td&gt;";
  rowData +=  "&lt;/tr&gt;";
  
  
  $("#acquisitionStatusList tbody").append(rowData);
  }
  </code></pre>