i made this with out regex, hahahah !!!! with O(n) loop
string.match() will return null if there's no match, and null has no property named 'length". So by doing || , you ensure that length will work
Interesting RegExp !!!
This should be the top solution its more effecient. Really long repetitive strings would bog the top one down.
I wonder how the length of an empty array could be 26?
Like, why not return (string.match(/([a-z])(?!.*\1)/ig)).length === 26;?
//And why doesn't the editor consider my RegExp to end...?
(I'm not very good at RegExp's, forgive me)
I pass all the intitial tests.
I've filtered out 'words' with spaces but I only pass about 2/3's (on average) of the main tests.
I've looked at a couple of the failed tests and if there are any differences between my result and the provided solution, they are not visible to the naked eye - so invisible characters perhaps...
Anyone have any clues?
Hi, I split the string into an array using space as a separator. Then I used the filter() method to get rid of all the empty strings in my array. I carried out all the other operations with the array returned by filter() method. I can't disclose my code here because it will be a spoiler
Thank you, I have been trying to sort this but couldn't get it to work correctly
How did you do that?
Now that this kata is approved, it needs random tests.
Thanks. I stuck on this test: Test.assertEquals(reverseMessage(''),'').
But i've already solved this problem
Thank you :)
Hi I moved the tests over into the example tests so you can see what's exactly being tested. I've tried to work out what causing your problem but I cannot figure it out so just thought I'd give you a short term solution for the time being