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.
See the last part of the description.
Move the first letter of each word to the end of it, then add "ay" to the end of the word.
Leave punctuation marks untouched.
Hope that helps.
For anyone having trouble understanding the description hopefully this will help.
Given positive integers
m, find all the integers less than
nthat have a squared digit sum equal to
It's called an Unary plus (+) and it converts a value to a number. Follow the link for a more in depth explanation.
Hope that helps :)
Removed colon from method name (Ruby)
If you refer to the first point under info in the description.
MUTATE the input array/list, don't return anything
You have created a new list
redrather than mutating the provided list
Hope that helps, goodluck :)
Minor issue - Ruby method name ends with a colon.
Within the insturctions you will find the following line.
Your code must test that all array items are numbers and return "invalid array" if it finds that either item is not a number.
There are no set tests that require validation which is why you pass them but fail the random tests.
If you have written code to validate the array and still getting an error there may be an issue within your code.
I hope this helps, goodluck :)
This Kata uses Node version 8.1.3 which doesn't support trimEnd, try trimRight instead :)
Should be fixed now
The issue is with your
Unless told otherwise
replacewill match the first instance in a string.
At the point you are running
replacethere are two instances of
Ein the string.
Replacesees the first instance and replaces it with
ethen returns the string which is why you are getting
Hope this helps, goodluck :)
The description should specify that the goal is to return the central element, as opposed to the central index. Also, as others have pointed out the problem is extremely simple. Maybe allow empty and/or even-length arrays as inputs and provide instructions for how the function should deal with them.
It appears the tests are using the same function name.
Loading more items...