var oldtime = new Date().getTime();
var str = [];
for(i=0;i{
str.push('abcabcabcabcabcabcabcabcabcabcabcabc'); new Date( ).getTime();
var JoinTime = (newtime - oldtime);
var oldtime = new Date().getTime()
var str=''; >for( i=0;i<100000;i )
{
str = 'abcabcabcabcabcabcabcabcabcabcabcabc';
}
var newtime = new Date().getTime()
var concatTime = (newtime - oldtime);
alert("join / concat: " (joinTime * 1.0 / concatTime))
참고: 루프 수는 충분히 커야 합니다.