Ad
  • Default User Avatar

    from javascript.info

    "
    But if there is a return statement, then the rule is simple:

    If return is called with an object, then the object is returned instead of this.
    If return is called with a primitive, it’s ignored.
    In other words, return with an object returns that object, in all other cases this is returned.
    "

  • Custom User Avatar

    Not sure, but I think beceause as soon as you call the NameMe function you will get the object back that is returned inside NameMe. So it will only get you the name. But if you return nothing you will get "this", so the NameMe object itself.

  • Custom User Avatar

    Clarified ;-)

  • Custom User Avatar

    Really enjoyed the concept and I think that it's a kata, the only thing was I found the instructions unclear that groupB was optional.

    It would be great if each group was clearly defined as to what would make them satisfed tieing together the language of the expected outputs and conditions.

  • Custom User Avatar

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