Ad
  • Default User Avatar

    About the CFML translation. The description states: Input Year with in range (1000  ≤  y  ≤  9000)

    However there are three test cases that test for 100, 200 and 333 and expect 1023, 2013 and 3401

  • Default User Avatar

    Yes you're absolutely correct. The test cases apparantly didn't test for this. Made a new solution that works with 2 negatives.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Hey Brad,

    I'm probably doing something wrong since I'm pretty new on Codewars. Locally my function is doing everything correct. However when I run it I'm getting errors. For example:

    [55, 60, 83]
    [55, 60, 83]
    Expected [false] Actual [true]

    Locally my function returns false, so that works.

    But when I copy past the above parameters into the sample tests on codewars it passes the test for my code. Is there any difference between how the sample tests are called and how the 'final attempt' is made?

    EDIT:

    When I change my function so that it has required parameters:

    function comp(required array a1,required array a2)

    I'm getting the error:

    The parameter a2 to function comp is required but was not passed in.

    Is the final test passing named parameters?