6 kyu
Array.isArray
670 of 676abednego
Loading description...
Arrays
Algorithms
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.
No sample tests
added
JS: Node v12 should be used enabled along with its appropiate assertion tools (Mocha + Chai).
added
Re-raising issue below.
.
RangeError: Maximum call stack size exceeded
Comment in intial setup says that
Array.isArray
will not work, unless you're referring to something else then you should mention what exactly.if i print array then it shows above error..
This is very old, troubled kata, and there's no possibility to edit it, unless author does so. There are many different ways to pass the tests, and logging stuff here is not really useful anyways.
Yeah, this kata worked great when I first made it. But the system has changed since then, and the idea doesn't work so well anymore. If anyone has a good plan for fixing it, let me know how I can give you ownership. Or we can simply delete this kata.
Afaik approved katas can't be deleted easily (only by mod/admin and many database related problems will occur) so it's not worth trouble, and changing kata on fundamental level (task itself or whole test suite) doesn't make too much sense either so it's probably best to leave kata as is for now, so I'm resolving the issue.
Anyone can edit it if there's an open issue older than a week.
Not the task itself, but changing tests does make sense when they don't work anymore.
Didn't know that, I assumed it's not possible since this kata pre-dates rating averages, if so then I'll create the issue.
They do (for whatever they're worth but I still find task lackluster). This doesn't work anymore. Only real problem is that loging throws.
Logging should be working now.
This comment has been hidden.
Open issues are needed to fix other's published katas.
Fixed. I also added some randomness.
Is it still possible to pass this kata ?
yes, though it may not be completed by traditional methods it is possible to pass this kata in this current state.
This kata is now broken because Test fixture implicitly calls Array.isArray on its arguments:
i thought it was the problem with CW. None of the katas i tried for the last three hours were not able to output test result. Something wrong must have happened on validation suite. i see only white page.
That's another issue: sometimes CW is not loading the JS files used by the tests properly. Just refresh the page a few times, and if there is no 404 error on get requests from the browser console, you're good to go.
https://github.com/Codewars/codewars.com/issues/928
well here's a fix, you can still pass this kata but it's a little hacky (see my solution).
A really tricky Kata indeed (what I would call "deceptively simple"), loved it, definitely starring it :D
Indeed, the last case failing made me realise I have no idea how Arrays work in js
This comment has been hidden.
Oh man, that last test case really threw me for a loop.