• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Career
  • Opportunities
    Find your next career challenge – powered by Qualified Jobs
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Log In
  • Sign Up
jhamon Avatar
Name:Unknown
Clan:Unknown
Member Since:Apr 2014
Last Seen:Oct 2018
Profiles:
    Following:0
    Followers:1
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (44)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • ozmos
      • commented on "Using closures to share class state" kata

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

    • Default User Avatar
      • Lucasss
      • commented on "Using closures to share class state" kata

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

    • Custom User Avatar
      • unstoo
      • commented on "Using closures to share class state" kata

      It won't work with 'class' syntax for some reason.
      You have to use the approach shown here: https://www.youtube.com/watch?v=gdjfsDlkH7A

    • Default User Avatar
      • Tomascch
      • commented on "Using closures to share class state" kata

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

    • Custom User Avatar
      • 11alexey11
      • commented on "Using closures to share class state" kata

      Can someone tell me what the error is?

      Uses Object.defineProperty to get and set instance weight
      Value is not what was expected

    • Default User Avatar
      • Mesqalito
      • created a suggestion for "Using closures to share class state" kata

      Add one more test - set felix.weight second time and check average. This will surely show some broken solutions.

    • Custom User Avatar
      • FArekkusu
      • created an issue for "Using closures to share class state" kata

      Use Object.defineProperty to write custom setters and getters

      This might have been the (only solution?) norm when this kata was created, but now that JavaScript has a proper class syntax with getters and setters, forbidding the use of modern language features is ridiculous.

    • Custom User Avatar
      • FArekkusu
      • resolved a question on "Using closures to share class state" kata

      If anybody's interested:

      Test.it("should have an averageWeight method", function () {
        Test.assertEquals(typeof Cat.averageWeight, 'function');
      });
      
    • Custom User Avatar
      • FArekkusu
      • resolved a question on "Using closures to share class state" kata
    • Custom User Avatar
      • FArekkusu
      • resolved a suggestion on "Using closures to share class state" kata

      Nobody's going to change it now.

    • Custom User Avatar
      • FArekkusu
      • created an issue for "Using closures to share class state" kata

      SyntaxError: Identifier 'Cat' has already been declared

      Why is there a Cat hidden in preloaded?

    • Custom User Avatar
      • Lends
      • commented on "Using closures to share class state" kata

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

    • Default User Avatar
      • janglewood
      • commented on "Using closures to share class state" kata

      I've imlement this method (all test are passed). What does this test check? method typeof?? If yes, my code also passed sample tests, which are check method typeof too

    • Custom User Avatar
      • Blind4Basics
      • commented on "Using closures to share class state" kata

      seems pretty clear, doesn't it? :o
      you have to define that averageWeight method, where appropriate for the current task.

    • Default User Avatar
      • janglewood
      • created a question for "Using closures to share class state" kata

      What I should do in this test?? I've pass all test except this one!

      should have an averageWeight method
      Expected: 'function', instead got: 'undefined'

    • Loading more items...
    • © 2022 Codewars
    • About
    • API
    • Announcements
    • Privacy
    • Terms
    • Contact
    • powered by

    Confirm

    • Cancel
    • Confirm

    Collect: kata

    Loading collection data...

    Add To My Collections
      • View
        Remove Add
      You have not created any collections yet.

      Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.

      Get started now by creating a new collection.

      You must wait until you have earned at least 20 honor before you can create new collections.

    Set the name for your new collection. Remember, this is going to be visible by everyone so think of something that others will understand.

    Create & Add New Collection