Retired
Printing Array elements with Comma delimiters II (retired)
34 of 74Javatlacati
Loading description...
Arrays
Fundamentals
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.
This comment has been hidden.
Please mention the type of inputs in the description, you are passing objects, we have to figure that out by looking at test cases, atleast in a real world scenario no body will ask you to code without mentioning the type of input, or atleast mention "mulitple data types will be given as input". Frustrating question!!!!
Need more random tests to prevent solution like this
Java translation - ANYTYPE is not a valid type. Should be of type Object.
Modify it to accept any type including Object ;)
Need to add test cases for types that can't be anticipated. I saw too many solutions attempting to mimic evey possible type that could be printed including all the basic primitives.
what types can't be anticipated?
Need to test primitve
long
array in JavaAddeded thank you.
This comment has been hidden.
'[["hello","this","is","an","array!"],["a","b","c","d","e!"]]'
Could you please use
Test.assertEquals
rather thanTest.expect
in your test cases ? ( Javascript)I don't know the javascript testing framework that's why I copied test case format from something I had solved. If you can give me a light on how to use assertequals insteafd of expect it will be greatly appreciated.
This comment has been hidden.
Thanyou! changing...
Wooow didn't see this comming... the change caused solutions already accepted to be rejected, still understanding why.. :(
Initial solution for javascript appears to be in a different language... (uses 'end' instead of {}). Also doesn't seem to work correctly for multiple word strings - do you want each letter to be comma separated, or just each word (array value) as stated?
Solved!
Also addeded a new test case for arrays of arrays with strings having several words
Thanks, can you post the new test case here - my example test cases dont update when you edit them, so I will be able to paste in from here
That's because those weren't added to example test cases. Once you think Issues have ben solved please consider change your vote to
ready to come out of beta
.That has been posted as a hidden comment. A test case example doesnt need to be hidden. I cant see it as I havent solved yet
Because this was not a example test case :P
Perhaps you should try the part I first :) http://www.codewars.com/kata/printing-array-elements-with-comma-delimiters
Already done :D
This comment has been hidden.
Expected results should be shwn when you run test cases so please let me now if this is not the case.
Yes, but I still think Description is the place where you should precise expected results are not simply "*comma delimited elements of the array *" and that, for example, bracketts should appear if elements are other than primitive values (ie other then Number, String or Boolean). *eg *:
Ok will add that to description for those specifical elements of the array
Mr. Garvin Do you need mor sample test cases? :)