Ad
  • Custom User Avatar

    It is not resolved. I am still getting the same error. Seems like tests are running in environment withou ''.repeat(). All you have to do is define it yourself:

    String.prototype.repeat = function(n) {
    var ret = this;
    while(--n) ret += this;
    return ret;
    };

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Can anyone help me understand why I keep getting error TypeError: Object has no method 'repeat' on here? When I run the code on repl.it, it works fine and meets requirements. I've read others have the issue, but the solution is a spoiler so I can't see it. Please help :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution