{"ScriptPreparationCode":"var targetArr = document.querySelectorAll(\u0022select\u0022);\r\nvar optionArr = [\r\n {CODE_NAME: \u0022one\u0022, CODE_ID: 1},\r\n {CODE_NAME: \u0022two\u0022, CODE_ID: 2},\r\n {CODE_NAME: \u0022one\u0022, CODE_ID: 1},\r\n {CODE_NAME: \u0022two\u0022, CODE_ID: 2}, {CODE_NAME: \u0022one\u0022, CODE_ID: 1},\r\n {CODE_NAME: \u0022two\u0022, CODE_ID: 2}, {CODE_NAME: \u0022one\u0022, CODE_ID: 1},\r\n \r\n {CODE_NAME: \u0022two\u0022, CODE_ID: 2}, {CODE_NAME: \u0022one\u0022, CODE_ID: 1},\r\n \r\n \r\n {CODE_NAME: \u0022two\u0022, CODE_ID: 2}\r\n \r\n];","TestCases":[{"Name":"legacy","Code":"targetArr.forEach(function(target) {\r\n optionArr.forEach(function(item) {\r\n var option = document.createElement(\u0022option\u0022)\r\n option.setAttribute(\u0022value\u0022, item.CODE_ID);\r\n option.innerText = item.CODE_NAME;\r\n target.append(option);\r\n });\r\n});","IsDeferred":false},{"Name":"refactoring","Code":"var fragment = document.createDocumentFragment();\r\nvar option = document.createElement(\u0022option\u0022);\r\n\r\noptionArr.forEach(function(item) {\r\n var cloneOption = option.cloneNode();\r\n cloneOption.setAttribute(\u0022value\u0022, item.CODE_ID);\r\n cloneOption.innerText = item.CODE_NAME;\r\n fragment.append(cloneOption);\r\n});\r\n\r\ntargetArr.forEach(function(target) {\r\n target.append(fragment.cloneNode(true));\r\n});","IsDeferred":false}]}