Draft
Isolate the keys
293 of 346kromitj
Loading description...
Arrays
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
my brain can't handle the creativity i had to use to not use the
keys
method ;pThis comment has been hidden.
Aliasing a built-in is a worthless practice.
Took me actually longer figuring out what to do than writing the solution...
Is there a way to improve this to include an example of collision, else this becomes very easy.
I would consider adding an example in the instructions section.
There should probably be some random tests.
duplicate issue
Need some better example tests
Needs random test cases
And please remove ability to use built-in functions in kata.
How you do that?
This comment has been hidden.
This comment has been hidden.
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".
The function is taking in an unnamed object though. You're saying you can't take an object literal as an argument?
The object is not unnamed. In your solution the parameter has the name
objLit
. Other solutions name itobj
,o
, orLit
.An "object literal" is not the same thing as an "object".
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.
I am marking this as resolved, since the description has been updated. Thanks!
Thanks for your input, it was "literally" awesome!