• Custom User Avatar

    Hi, you should avoid using global/shared variables as your function has side effects using it.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Hello everyone, I'm new here and this is my first Kata. Can someone please explain to me what is going on. I just finished up the code and was excited when all of the tests passed then this happened.

    Basic tests
    Test Passed: Value == wording, words, wordy, wordz
    Test Passed: Value == ha, he, hi, ho
    Test Passed: Value == a, ba, cat, wax, yellow, zephyr
    Test Passed: Value == today, are, doing, hello, you, how
    Test Passed: Value == wording, words, wordy, wordz
    Test Passed: Value == ha, he, hi, ho
    Test Passed: Value == a, ba, cat, wax, yellow, zephyr
    Test Passed: Value == today, are, doing, hello, you, how
    Random tests
    Testing for "August Samuel Wahlen, Paul von Oberstein, Emil von Secla, Karl Robert Steinmetz, Fritz Josef Bittenfeld, Ernst von Eisenach, Arthur von Streit", 10
    TypeError: Object function {
    var i = this.length,
    j,
    k;
    for {
    j = Math.floor(Math.random() * this.length);
    k = this[--i];this[i] = this[j];this[j] = k;
    }
    return this;
    } has no method 'substring'
    at sortIt
    at Object.Test.it
    at Object.Test.describe

        at Object.<anonymous>
    

    8 Passed
    0 Failed
    40 Errors
    Process took 81ms to complete

    I'm really confused. None of this code is even anything I wrote. How do I get a typeError for something I never put in there. I'm sure there is a simple explanation I hope that someone can explain to me whats happening. Thank You