• 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
iphp Avatar
Name:Unknown
Clan:Unknown
Member Since:May 2014
Last Seen:Jul 2014
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (31)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Lucasss
    • commented on "Deep Freeze" javascript solution
    • 3 years ago

    This function doesn't perform complete freeze. Object.keys(object) lists only own enumerable properties, leaving behind the non-enumerable ones. For example:

    const o = Object.create(null, {
        prop1: {value:{word:'Hello'}, writable: true, configurable: true, enumerable: true},
        prop2: {value:{word:'World'}, writable: true, configurable: true, enumerable: true},
        prop3: {value:{word:"Don't forget me!"}, writable: true, configurable: true, enumerable: false}, 
    });
    
    Object.deepFreeze(o);
    
    o.prop3.word === "Don't forget me!";  --> true
    o.prop3.word = "I've been left unfrozen:-(";
    o.prop3.word === "I've been left unfrozen:-(";  --> true
    
  • Custom User Avatar
    • abdallah-nour
    • commented on "Default Arguments" javascript solution
    • 3 years ago

    🐱‍🏍 great!

  • Custom User Avatar
    • abdelghanyMh
    • commented on "Regex Password Validation" javascript solution
    • 4 years ago

    github.com/aloisdg/awesome-regex

  • Custom User Avatar
    • manuel_heav
    • commented on "Regex Password Validation" javascript solution
    • 4 years ago

    Nice one! where can I learn about this kinds regex

  • Custom User Avatar
    • Haggr
    • commented on "Default Arguments" javascript solution
    • 6 years ago

    Such a sweet, well-written solution. Even looking at it makes me feel better (and a bit jealous.)

  • Custom User Avatar
    • jalooc
    • commented on "Deep Freeze" javascript solution
    • 6 years ago

    You could make it even simpler with Object.values instead of Object.keys and thus avoid [] accessors

  • Custom User Avatar
    • CraigRoss
    • commented on "Regex Password Validation" javascript solution
    • 7 years ago

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

  • Custom User Avatar
    • phildinius
    • commented on "Regex Password Validation" javascript solution
    • 7 years ago

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

  • Custom User Avatar
    • FeranD
    • commented on "Regex Password Validation" javascript solution
    • 7 years ago

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

  • Custom User Avatar
    • alexshavlovsky
    • commented on "Escape HTML Markup" javascript solution
    • 7 years ago

    this code is incredibly fast due to the absence of a split-join chain

  • Custom User Avatar
    • dayfine
    • commented on "Default Arguments" javascript solution
    • 8 years ago

    I was thinking about how to get the names passed down as well...but always forgot that functions are first-order objects

    I cheated with global variable instead -_________-

  • Custom User Avatar
    • fr0ggy
    • commented on "Regex Password Validation" javascript solution
    • 8 years ago

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

  • Custom User Avatar
    • macksfield
    • commented on "Regex Password Validation" javascript solution
    • 8 years ago

    This returns true with a bad pw of input "fjd3IR9.;"
    Will incorrectly approve it.

  • Custom User Avatar
    • matthewmazurek
    • commented on "Regex Password Validation" javascript solution
    • 9 years ago

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

  • Custom User Avatar
    • mrkishi
    • commented on "Default Arguments" javascript solution
    • 9 years ago

    I'm not sure what you mean. Whatever it is, it was a coincidence, as ES2015 wasn't really a thing back when I did this (2013)!

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...