{"ScriptPreparationCode":null,"TestCases":[{"Name":"Regex","Code":"const slug = \u0022measure-that-net\u0022\r\nconst result = slug\r\n .replace(/-/g, \u0027 \u0027) // replace dashes with spaces\r\n .replace(/\\b\\w/g, (match) =\u003E match.toUpperCase()); // capitalize the first letter of each word\r\n \r\nconsole.log(result)","IsDeferred":false},{"Name":"Javascript","Code":"const slug = \u0022measure-that-net\u0022\r\nconst result = slug\r\n .split(\u0027-\u0027)\r\n .map((word) =\u003E word.charAt(0).toUpperCase() \u002B word.slice(1))\r\n .join(\u0027 \u0027)\r\n \r\n console.log(result)","IsDeferred":false}]}