The codes below are displaying the last 3 lines of .js file in the following format :
data3,title3,msg3
data4,title4,msg4
data5,title5,msg5
i.e. its displaying the data of last 3 lines
But, I want it in the following (reverse) format
data3,title5,msg5
data4,title4,msg4
data5,title3,msg3
Any help will be appreciated, thanks
<script language=”JavaScript” type=”text/javascript”><!–
for(var i=dataSet.length-3; i<dataSet.length; i++) {
for(var j=0; j<3; j++)
document.write(dataSet[i][j]+ “,”);
}
p.s. “dataSet” refers to an array in .js file. I am copying 2 sample lines of that
dataSet[dataSet.length]=new Array(“date4”, “title4″,”msg4”);
dataSet[dataSet.length]=new Array(“date5”, “title5″,”msg5”);
———————————————————-
Thanks