Test case details

Preparation Code

<script>   var str = 'string';   var barr = ['this', ' is', ' a', str, ' to', ' test', ' if', ' there', ' is', ' any', ' difference', ' between', ' concat', ' and', ' join'];   var sarr = ['this', ' is', ' a', str]; </script>

Test cases

Test #1

var a = 'this' + ' is' + ' a' + str + ' to' + ' test' + ' if' + ' there' + ' is' + ' any' + ' difference' + ' between' + ' concat' + ' and' + ' join';

Test #2

var a = barr.join('');

Test #3

var a = 'this' + ' is' + ' a' + str;

Test #4

var a = sarr.join('');

Test #5

var str = ''; for (var i = 0; i < barr.length; i++) {   str += barr[i]; }

Test #6

['this', ' is', ' a', str, ' to', ' test', ' if', ' there', ' is', ' any', ' difference', ' between', ' concat', ' and', ' join'].join('');

Test #7

['this', ' is', ' a', str].join('');

Test #8

(new Array('this', ' is', ' a', str, ' to', ' test', ' if', ' there', ' is', ' any', ' difference', ' between', ' concat', ' and', ' join')).join("");