Retired
All Types of Emptiness (retired)
7CYin
Loading description...
Fundamentals
Data Types
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.
For even more undifferent emptiness, read up on positive and negative zero.
But please don't make a kata out of it. :P
...aaaand here ya go
and so on...
Two more reasons not to do it .. :D
You are expecting unstandard behaviour for JS. Even if you're going to specify it, it's not a good idea.
NaN
should not be equal toNaN
, and holes in sparse arrays do not have "variables" ( ie, values ) to change.hmm ok, I won't publish this kata then.
Well, you can, but I would stay closer to standard JS behaviour. Do not fill holes in sparse arrays ( or explicitly specify that behaviour - it does make for interesting programming ), do not require
NaN === NaN
( really, just don't go there ), but otherwise replace existing values withnull
where applicable, and you won't hear me.In light of below issue, it might be a good idea to specify all that, if only with the text "according to standard JS behaviour", though.
And with random tests. ( Did you read the documentation on creating your first kata? It still applies to your second one. :)
Resolved by retirement. Closing.
Hi,
I fear the description is way less than sufficient... :o
And you need random tests.
cheers