Draft
//
Loading description...
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.
String
is almost never a good way to tuple up values, and it isn't here.(Int,Bool)
( encoded as anArray
, because JS doesn't have tuples ) would be appropriate.Stringifying things does not mean you are now suddenly asking for consistent ones. You should have asked for
(Int,Bool)
, and that can never express the condition that there is no answer that fits that pattern. Expecting anError
to bethrow
n, or maybe expecting[]
,null
orundefined
( though there are people with whom those choices will also get you in hot water ) would have been better. I thinkError
is best, but I'd say an empty value like one of the other three is marginally acceptable. ( It would be a ++Good Thing if you could explain the differences between them in the context of this kata, were you to use any of them. )Both point are largely academic IMO. I don't think the kata offers sufficient novelty and interest to invest time in fixing it. Everything that this kata is asking for has been done ( and arbitrarily combining unrelated tasks is not a good thing either ).
Minor point: JS by convention uses camelCase ( except for constants and constructors ).
"LCN"
should have been"lcn"
by that standard. Please adhere to this convention.Thanks for the tips :)
You're welcome. Also, do not hesitate to use available resources ( there's a whole gitter channel specifically for it ) when authoring kata.
Appropriate datatypes can be an advanced topic, with conflicting opinions, all of them including mine wrong, of course. :P You can ask for advice even before publishing a kata! ( The docs actually recommend this. )
Please let me know if the discription is clear! :)