{"ScriptPreparationCode":null,"TestCases":[{"Name":"A","Code":"const ALLOW_LETTERS = 2;\r\nconst REPLACER = \u0027*\u0027;\r\nvar value = \u0022ok123\u0022;\r\n\r\nvar result = value.slice(0, ALLOW_LETTERS) \u002B REPLACER.repeat(value.length - ALLOW_LETTERS);","IsDeferred":false},{"Name":"B","Code":"const ALLOW_LETTERS = 2;\r\nconst REPLACER = \u0027*\u0027;\r\nvar value = \u0022ok123\u0022;\r\n\r\nvar result = value.split(\u0027\u0027).map(function(letter, index) {\r\n if (index \u003E= ALLOW_LETTERS \u0026\u0026 !/\\s/.test(letter)) {\r\n return REPLACER;\r\n }\r\n return letter;\r\n}).join(\u0027\u0027);","IsDeferred":false}]}