Ad
  • Custom User Avatar

    Thanks! I understand now. My confusion was a result of me misreading the instructions. I can see that once is indeed only called once; I thought "logOnce" was the name of the "once" function; so I thought it was being called multiple times in the example given in the instructions.

  • Custom User Avatar

    I guess I don't understand this Kata, but wouldn't this function always run the given argument function? You're setting call to true everytime, so in what case would it be false in the anonymous function that is being returned? I can see its being set to false in the anon function, but once that function runs and you call once again, you run through the beginning again which sets call to true, and would make the function run again, wouldnt it?

    Thakns.

  • Custom User Avatar

    When submitting, the error message returned would say "MyObject is undefined". I started out with this code:

    var myObj = {};
    myObj.proto = MyObject.prototype;

    This threw me off; I thought MyObject was already defined, but the error messages along with that not being explicitly laid out in the description of this problem made me uncertain about this. Eventually I just wanted to look at the answer. I get the intention of the problem now, but it should be made clearer in its description.

  • Custom User Avatar

    var j was for debbugging purposes. I forgot to remove it.

  • Custom User Avatar

    What is wrong with those implementations, if I may ask?

  • Custom User Avatar

    I might be incorrect, but I believe these 2 are the same thing?