function xntest(){
var d1=new Date() ;
var str="";
for(var i=0;i<10000;i ){
str ="stext";
}
var d2=new Date() ;
document.write("String concatenation method takes time:" (d2.getTime()- d1.getTime()) "Milliseconds;");
d1=new Date();
var sb=new Array();
for(var i=0;i<10000;i ){
sb.push("stext");
}
var result=sb.toString( );
d2=new Date();
document.write(" Array method takes time: " (d2.getTime()- d1.getTime()) "Milliseconds;");
}