{"ScriptPreparationCode":"var myArray = [\u0022Hello\u0022, \u0022world\u0022, \u0022!\u0022, \u0022This\u0022, \u0022is\u0022, \u0022a\u0022, \u0022benchmark\u0022, \u0022!\u0022];","TestCases":[{"Name":"Document Fragment","Code":"// Appending to a fragment and adding that fragment to the DOM at the end\r\nvar frag = document.createDocumentFragment();\r\n$.each(myArray, function(i, item) {\r\n var newListItem = document.createElement(\u0022li\u0022),\r\n itemText = document.createTextNode(item);\r\n newListItem.appendChild(itemText);\r\n frag.appendChild(newListItem);\r\n});\r\n$(\u0022#content\u0022)[0].appendChild(frag);","IsDeferred":false},{"Name":"String Concatenation","Code":"// Appending to a string and generating an HTML tree out of the string and appending it to the DOM\r\nvar myHtml = \u0022\u0022;\r\n$.each(myArray, function(i, item) {\r\n myHtml \u002B= \u0022\u003Cli\u003E\u0022 \u002B item \u002B \u0022\u003C/li\u003E\u0022;\r\n});\r\n$(\u0022#content\u0022).html(myHtml);","IsDeferred":false}]}