Draft

Isolate the keys

293 of 346kromitj
Description
Loading description...
Arrays
  • Please sign in or sign up to leave a comment.
  • willfowls Avatar

    my brain can't handle the creativity i had to use to not use the keys method ;p

  • FArekkusu Avatar

    Aliasing a built-in is a worthless practice.

  • ds_one Avatar

    Took me actually longer figuring out what to do than writing the solution...

  • Rahul_Raviprasad Avatar

    Is there a way to improve this to include an example of collision, else this becomes very easy.

  • mjstromberg Avatar

    I would consider adding an example in the instructions section.

  • kolohelios Avatar

    There should probably be some random tests.

  • wardymate Avatar

    Need some better example tests

  • donaldsebleung Avatar

    Needs random test cases

  • user9675453 Avatar

    And please remove ability to use built-in functions in kata.

  • PaulCalvelage Avatar

    It doesn't make sense to talk about "taking in" a literal. It's an oxymoron. Once you refer to the object by name as a parameter, it's no longer literal by definition.

    The word "literal" means written out with curly braces rather than referred to by a variable name. See Object literals at MDN.

    So "Object Literal" in the description should be changed to "Object parameter" or "Object reference".

    • kromitj Avatar

      The function is taking in an unnamed object though. You're saying you can't take an object literal as an argument?

    • PaulCalvelage Avatar

      The object is not unnamed. In your solution the parameter has the name objLit. Other solutions name it obj, o, or Lit.

      An "object literal" is not the same thing as an "object".

      • An object is a data type. It exists in memory. I can pass references to it as arguments to functions. Any time I use this data type, I am using an object.
      • An object literal is part of the grammar of the language. It's a specific way of writing code that the JavaScript engine can understand -- by enclosing a list of properties within curly braces. It only exists in the source code. Any time I use the curly brace syntax, I am using an object literal.

      If I am not using curly brace syntax, then by definition, I am not using an object literal. Out of the 18 solutions so far, none use the curly brace syntax. Thus, by definition, none use object literals.

      You are writing "object literal", when you really mean an "object" created by an object literal in the test code. But no one can see the test code until they have completed the kata. So they don't know whether you used new Object() or an object literal. And it doesn't make a difference.

      As it stands, object literals have no bearing on this kata whatsoever, which is why the wording of the description should be changed.

    • PaulCalvelage Avatar

      I am marking this as resolved, since the description has been updated. Thanks!

      Issue marked resolved by PaulCalvelage 9 years ago
    • kromitj Avatar

      Thanks for your input, it was "literally" awesome!