7 kyu
JavaScript seems to be broken
569tfKamran
Loading description...
Arrays
Debugging
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.
How am I supposed to fix it if I don't know what causes the problem in the first place?
that's the main point of the kata
Well, if that's the case, I'd suggest adding a
puzzle
tag.This comment has been hidden.
yupppp, this kata is basically similar to this using the same technique
I'd change the description because it says 'find solution in any possible way',
but the test cases say 'You are expected to fix it, and not find an alternative.'
Exactly
Typo in description: "peice"
Thanks
6 years later, fixed
I'm having the same issue as alessandro with my code:
function semicolonSeparationToCommaSeparation(input) { var newArr = []; var x = input.split("");
for (var i = 0; i <x.length; i++) { if (x[i] !== ';') { newArr.push(x[i]); } else if (x[i] === ';') { newArr.push(','); } } return newArr.join(''); }
Let's see what you have done...
Test Passed
Test Passed
Testing if it works right...
Expected: 1,2,3, instead got: 1;2;3
Code works fine and returns 1,2,3 on my console. Something is wrong with the test cases.
Could you please post what you were trying? (And mark it as a spoiler obviously)
It would be easier to see what's wrong with your solution or this Kata. :)
This comment has been hidden.
Also having the same problem, my code returns the expected answer outside of this kata.. but within the kata it still returns 1;2;3.
Me too. Somehow the
.join
method is broken.That's part of the task ~~
You could have more fixed tests and random tests. Quite too easy to cheat. Moreover very similar to other "replace" something...
This comment has been hidden.
Fixed. :)
the solution expected is different to the actual solution
Sorry I didn't get you. Could you be more specific?
I think you meant to say that a solution with
String.prototype.replace
is accepted.Thanks for reporting, it is fixed. :)