Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thank you! Totally lost until learning about non-breaking spaces. Using the character code did it.
The kata are considered not exact duplicates.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/131.
Please join the discussion to help us identify duplicate kata and retire them.
If you need a non-breaking space ("break space") you can scroll to the bottom of sample tests and use the red dot, or use character code 65279.
"A commonly used entity in HTML is the non-breaking space. A non-breaking space is a space that will not break into a new line. Two words separated by a non-breaking space will stick together (not break into a new line)." - W3 Schools
This comment is hidden because it contains spoiler information about the solution
what is the non-whitespace? i cant get it (
split(" ") --> need a space " ", if closed "" will break down everything into a single character not whole word example: "hello world".split(" ") --> ['hello', 'world' ] "hello world.split("") --> [
'h', 'e', 'l', 'l',
'o', ' ', 'w', 'o',
'r', 'l', 'd'
]
hint: join() is not needed to solve this but doesn't mean your approah is wrongs and might need it to get rid of spaces...(haven't ran code but seems you're getting rid of spaces with loop)
Sooo...
with join() the default will join every thing with a "," inbetween example H,e,l,l,o,'',W,o,r,l,d
with no space chosen ("") as how to join the split "hello world".split(" ").join("") --> HelloWorld as one word
with space chosen (" ") as how to join the split "hello world".split(" ").join(" ") --> hello world
*Note that "hello world".split("").join("") will return the same becasue of the space when split into single characters
*BUT! with this you need to split into seperate words so..
"what (3 spaces) ever sentence".split(" ")
(put (3 spaces) to represent becasue when submitted this reply it took away spaces! ugh!)
--> will split all the whole words and spaces into thier own index like [ 'what', '', '', 'ever', 'sentence' ] and join(" ") with a space inbetween ..."what ever sentence"...join("") --> "whateversentence"
hope this helps refactor easier :)
Worst kata ever.
what are space-like characters?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You're well-educated to tell it
"I'm looking so cool today"
Expected: 5, instead got: 6
1)I
2)m (short form from "am")
3)looking
4)so
5)cool
6)today
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...