• 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
  • 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
  • Blog
    Read the latest news from Codewars and the community
  • 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 (45)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • DDD-fx
      • commented on "Using closures to share class state" kata
      • 3 years ago

      if you use function expression for that method you have to remember about hoisting

    • Custom User Avatar
      • ozmos
      • commented on "Using closures to share class state" kata
      • 3 years ago

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

    • Custom User Avatar
      • Lucasss
      • commented on "Using closures to share class state" kata
      • 4 years ago

      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
      • 4 years ago

      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

    • Custom User Avatar
      • Tomascch
      • commented on "Using closures to share class state" kata
      • 5 years ago

      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
      • 5 years ago

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

    • Custom User Avatar
      • Mesqalito
      • created a suggestion for "Using closures to share class state" kata
      • 5 years ago

      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
      • 5 years ago

      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
      • 5 years ago

      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
      • 5 years ago
    • Custom User Avatar
      • FArekkusu
      • resolved a suggestion on "Using closures to share class state" kata
      • 5 years ago

      Nobody's going to change it now.

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

      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
      • 5 years ago

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

    • Custom User Avatar
      • janglewood
      • commented on "Using closures to share class state" kata
      • 6 years ago

      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
      • 6 years ago

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

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...