{"ScriptPreparationCode":null,"TestCases":[{"Name":"one for loop and one if statement","Code":"function allcharsIndex(n = 0, limit = 65520) {\r\n if (typeof n !== \u0022number\u0022) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \u0022parameter 1 is not of type number\u0022;\r\n }\r\n\r\n if (typeof limit !== \u0022number\u0022) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \u0022parameter 2 is not of type number\u0022;\r\n }\r\n\r\n if (limit \u003E 65520) limit = 65520;\r\n\r\n function getCh(eye) {\r\n let cnt = 0;\r\n let char = String.fromCharCode(eye);\r\n let cg = char;\r\n while (cnt\u002B\u002B \u003C n) {\r\n char = \u0060${char}${cg}\u0060;\r\n }\r\n return char;\r\n }\r\n\r\n let characters = [getCh(32), getCh(33)];\r\n\r\n for (let i = 35; i \u003C 65520; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n\r\n if (\r\n i === 92 ||\r\n i === 127 ||\r\n i === 128 ||\r\n i === 129 ||\r\n i === 130 ||\r\n i === 131 ||\r\n i === 132 ||\r\n i === 133 ||\r\n i === 134 ||\r\n i === 135 ||\r\n i === 136 ||\r\n i === 137 ||\r\n i === 138 ||\r\n i === 139 ||\r\n i === 140 ||\r\n i === 141 ||\r\n i === 142 ||\r\n i === 143 ||\r\n i === 144 ||\r\n i === 145 ||\r\n i === 146 ||\r\n i === 147 ||\r\n i === 148 ||\r\n i === 149 ||\r\n i === 150 ||\r\n i === 151 ||\r\n i === 152 ||\r\n i === 153 ||\r\n i === 154 ||\r\n i === 155 ||\r\n i === 156 ||\r\n i === 157 ||\r\n i === 158 ||\r\n i === 159 ||\r\n i === 173 ||\r\n i === 1536 ||\r\n i === 1537 ||\r\n i === 1538 ||\r\n i === 1539 ||\r\n i === 1540 ||\r\n i === 1807 ||\r\n i === 6068 ||\r\n i === 6069 ||\r\n i === 8204 ||\r\n i === 8205 ||\r\n i === 8206 ||\r\n i === 8207 ||\r\n i === 8232 ||\r\n i === 8233 ||\r\n i === 8234 ||\r\n i === 8235 ||\r\n i === 8236 ||\r\n i === 8237 ||\r\n i === 8238 ||\r\n i === 8239 ||\r\n i === 8288 ||\r\n i === 8289 ||\r\n i === 8290 ||\r\n i === 8291 ||\r\n i === 8292 ||\r\n i === 8293 ||\r\n i === 8294 ||\r\n i === 8295 ||\r\n i === 8296 ||\r\n i === 8297 ||\r\n i === 8298 ||\r\n i === 8299 ||\r\n i === 8300 ||\r\n i === 8301 ||\r\n i === 8302 ||\r\n i === 8303 ||\r\n i === 65279\r\n )\r\n continue;\r\n\r\n characters.push(getCh(i));\r\n }\r\n return [...characters];\r\n}\r\nallcharsIndex();","IsDeferred":false},{"Name":"one for loop and manipulating value of index","Code":"function allcharsIndex(n = 0, limit = 65520) {\r\n if (typeof n !== \u0022number\u0022) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \u0022parameter 1 is not of type number\u0022;\r\n }\r\n\r\n if (typeof limit !== \u0022number\u0022) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \u0022parameter 2 is not of type number\u0022;\r\n }\r\n\r\n if (limit \u003E 65520) limit = 65520;\r\n\r\n function getCh(eye) {\r\n let cnt = 0;\r\n let char = String.fromCharCode(eye);\r\n let cg = char;\r\n while (cnt\u002B\u002B \u003C n) {\r\n char = \u0060${char}${cg}\u0060;\r\n }\r\n return char;\r\n }\r\n\r\n let characters = [getCh(32), getCh(33)];\r\n\r\n for (let i = 35; i \u003C 65520; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n if (i === 127) {\r\n i = 159;\r\n continue;\r\n }\r\n\r\n if (i === 1536) {\r\n i = 1540;\r\n continue;\r\n }\r\n\r\n if (i === 8204) {\r\n i = 8207;\r\n continue;\r\n }\r\n if (i === 8232) {\r\n i = 8239;\r\n continue;\r\n }\r\n\r\n if (i === 8288) {\r\n i = 8303;\r\n continue;\r\n }\r\n\r\n if (i === 8288) {\r\n i = 8303;\r\n continue;\r\n }\r\n\r\n if (\r\n i === 92 ||\r\n i === 173 ||\r\n i === 1807 ||\r\n i === 6068 ||\r\n i === 6069 ||\r\n i === 65279\r\n )\r\n continue;\r\n\r\n characters.push(getCh(i));\r\n }\r\n return [...characters];\r\n}\r\nallcharsIndex();","IsDeferred":false},{"Name":"no if checks just many for loops","Code":"function allcharsIndex(n = 0, limit = 65520) {\r\n if (typeof n !== \u0022number\u0022) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \u0022parameter 1 is not of type number\u0022;\r\n }\r\n\r\n if (typeof limit !== \u0022number\u0022) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \u0022parameter 2 is not of type number\u0022;\r\n }\r\n\r\n if (limit \u003E 65520) limit = 65520;\r\n\r\n function getCh(eye) {\r\n let cnt = 0;\r\n let char = String.fromCharCode(eye);\r\n let cg = char;\r\n while (cnt\u002B\u002B \u003C n) {\r\n char = \u0060${char}${cg}\u0060;\r\n }\r\n return char;\r\n }\r\n\r\n let characters = [getCh(32), getCh(33)];\r\n\r\n for (let i = 35; i \u003C 92; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 93; i \u003C 127; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 160; i \u003C 173; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 174; i \u003C 1536; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 1541; i \u003C 1807; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 1808; i \u003C 6068; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 6070; i \u003C 8204; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 8208; i \u003C 8232; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 8240; i \u003C 8288; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 8304; i \u003C 65279; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n for (let i = 65280; i \u003C 65520; i\u002B\u002B) {\r\n if (characters.length \u003E= limit) return [...characters];\r\n characters.push(getCh(i));\r\n }\r\n\r\n return [...characters];\r\n}\r\n\r\nallcharsIndex();","IsDeferred":false}]}