{"ScriptPreparationCode":"var str = \u0027d sd a SDAS dad sad asd ad SAd sad fgh gfhgjhg fgdjf h;dsfgs dflgk sdljl dfgjdfg lkdfsjgl sdg jdsflg gjdhdjrebfkjsfgnfsd ngkjdfgn dfsng ndfklgndsfkjlgn kjlsdfng jklndfsgljkndsfklgndsfkjlgnfdkjgn sjkflgndfskjlgn dkjlfgnldskjngfdlkjgndsflgn dfskljg nfdgl kdfnsgljkfsdnglkjsdfnglskjdgnsdlfgnsdfjgnsfdlkhj sfdjhl\u0027;","TestCases":[{"Name":"Loop with N/2 iterations and 2x iteration size","Code":"var end = str.length / 2 | 0;\r\nvar res1 = \u0027\u0027;\r\nvar res2 = \u0027\u0027;\r\nvar resA = \u0027\u0027;\r\nfor (let i = 0; i \u003C end; i\u002B\u002B) {\r\n res1 \u002B= \u0027#\u0027 \u002B str[i];\r\n res2 \u002B= \u0027#\u0027 \u002B str[i \u002B end];\r\n}\r\n\r\nresA = res1 \u002B res2 \u002B ((str.length % 2) ? \u0027#\u0027 \u002B str[str.length-1] : \u0027\u0027 ) \u002B \u0027#\u0027;","IsDeferred":false},{"Name":"Simple Loop","Code":"var length = str.length;\r\nvar resB = \u0027\u0027;\r\nfor (let i = 0; i \u003C length; i\u002B\u002B) {\r\n resB \u002B= \u0027#\u0027 \u002B str[i];\r\n}\r\nresB \u002B= \u0027#\u0027;","IsDeferred":false},{"Name":"Reverse While","Code":"var i = str.length;\r\nvar resC = \u0027\u0027;\r\nwhile (i--) {\r\n resC = str[i] \u002B \u0027#\u0027 \u002B resC;\r\n}\r\nresC = \u0027#\u0027 \u002B resC;","IsDeferred":false},{"Name":"Reverse While !== 0","Code":"var i = str.length;\r\nvar resD = \u0027\u0027;\r\nwhile (i-- !== 0) {\r\n resD = str[i] \u002B \u0027#\u0027 \u002B resD;\r\n}\r\nresD = \u0027#\u0027 \u002B resD;","IsDeferred":false}]}