{"ScriptPreparationCode":null,"TestCases":[{"Name":"slice","Code":"function capitalize(str) {\r\n return \u0060${str[0].toUpperCase()}${str.slice(1)}\u0060;\r\n}\r\n\r\nfor ( let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n\tcapitalize(\u0027ho hiep 111\u0027);\r\n}","IsDeferred":false},{"Name":"destructure","Code":"function capitalize(str) {\r\n const [first, ...rest] = str;\r\n return \u0060${first.toUpperCase()}${rest}\u0060;\r\n}\r\n\r\nfor ( let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n\tcapitalize(\u0027ho hiep 111\u0027);\r\n}","IsDeferred":false},{"Name":"lodash","Code":"for ( let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n\t_.capitalize(\u0027ho hiep 111\u0027) \r\n}","IsDeferred":false},{"Name":"replace","Code":"function capitalize(str) {\r\n return str.replace(/(^[a-z]|\\s[a-z])/g, text =\u003E text.toUpperCase())\r\n}\r\n\r\nfor ( let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n\tcapitalize(\u0027ho hiep 111\u0027) \r\n}","IsDeferred":false}]}