{"ScriptPreparationCode":"var source = {\r\n \u0022box-sizing\u0022: \u0022border-box\u0022,\r\n \u0022margin\u0022: 0,\r\n \u0022padding\u0022: 0,\r\n \u0022border-width\u0022: 0,\r\n \u0022border-style\u0022: \u0022solid\u0022,\r\n \u0022border-color\u0022: \u0022#ddd\u0022,\r\n \u0022letter-spacing\u0022: \u0022calc(0.04 * (1rem - 1em))\u0022,\r\n \u0022transition-property\u0022: \u0022none\u0022,\r\n \u0022transition-duration\u0022: \u00220.3s\u0022\r\n}\r\n\r\nfunction iteratee(property, value) {\r\n return \u0060${property}:${value}\u0060\r\n}","TestCases":[{"Name":"for loop (without join)","Code":"const sourceKeys = Object.keys(source)\r\nlet result = \u0022\u0022\r\n\r\nfor (let i = 0; i \u003C sourceKeys.length; i\u002B\u002B) {\r\n result \u002B= iteratee(sourceKeys[i], source[sourceKeys[i]])\r\n\r\n if (i \u003C sourceKeys.length - 1) {\r\n result \u002B= \u0022;\u0022\r\n }\r\n}","IsDeferred":false},{"Name":"for loop (with join)","Code":"const sourceKeys = Object.keys(source)\r\nconst resultArray = new Array(sourceKeys.length)\r\n\r\nfor (let i = 0; i \u003C sourceKeys.length; i\u002B\u002B) {\r\n resultArray[i] = iteratee(sourceKeys[i], source[sourceKeys[i]])\r\n}\r\n\r\nconst result = resultArray.join(\u0022;\u0022)","IsDeferred":false},{"Name":"for-in loop","Code":"const resultArray = []\r\n\r\nfor (const key in source) {\r\n resultArray.push(iteratee(key, source[key]))\r\n}\r\n\r\nconst result = resultArray.join(\u0022;\u0022)","IsDeferred":false},{"Name":"for-of loop","Code":"const resultArray = []\r\n\r\nfor (const key of Object.keys(source)) {\r\n resultArray.push(iteratee(key, source[key]))\r\n}\r\n\r\nconst result = resultArray.join(\u0022;\u0022)","IsDeferred":false},{"Name":"map","Code":"const result = Object.keys(source)\r\n .map((key) =\u003E \u0060${key}:${source[key]}\u0060)\r\n .join(\u0022;\u0022)","IsDeferred":false},{"Name":"reduce","Code":"const result = Object.keys(source).reduce((memo, key) =\u003E {\r\n const mapResult = iteratee(key, source[key])\r\n\r\n return (memo) ? \u0060${memo};${mapResult}\u0060 : mapResult\r\n})","IsDeferred":false}]}