Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    For anyone having trouble understanding the description hopefully this will help.

    Given positive integers n and m, find all the integers less than n that have a squared digit sum equal to m.

  • Custom User Avatar

    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 :)

  • Custom User Avatar
  • Custom User Avatar

    Codeblock fixed

  • Custom User Avatar

    Removed colon from method name (Ruby)

  • Custom User Avatar

    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 red rather than mutating the provided list wealth.

    Hope that helps, goodluck :)

  • Custom User Avatar

    Minor issue - Ruby method name ends with a colon.

    def make_new_list(list): <---
      #....
    end
    
  • Custom User Avatar

    Expected and actual values appear to be reversed in the true test error message. (JavaScript)

    expected 360548 to equal '360548' 
    
  • Custom User Avatar

    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.

    [100, 200] // Both values are numbers so the array is valid
    [100, '200'] // The second value is not a number so the array is invalid
    ['hello','world'] // Neither value is a number so the array is invalid
    

    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 :)

  • Custom User Avatar

    This Kata uses Node version 8.1.3 which doesn't support trimEnd, try trimRight instead :)

  • Default User Avatar

    Should be fixed now

  • Custom User Avatar

    The issue is with your replace method.

    Unless told otherwise replace will match the first instance in a string.

    At the point you are running replace there are two instances of E in the string.

    EXAMPLE
    ^     ^
    1     2
    

    Replace sees the first instance and replaces it with e then returns the string which is why you are getting eXAMPLE instead of EXAMPLe.

    Hope this helps, goodluck :)

  • Custom User Avatar

    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.

  • Custom User Avatar

    JavaScript tests are broken.

    It appears the tests are using the same function name.

    function center(arr){
      return .....
    }
    
    function sol(arr) {
     return .....
    }
    
  • Loading more items...