Ad
  • Custom User Avatar
  • Default User Avatar

    no problem, Ed. I don't know why you're passing one test but it doesn't lend any credibility to your approach; I hope you can re-work your algorithm to modify the input array "in-place"

  • Custom User Avatar

    Sorry. 'Big Boy' is the largest array test.

  • Custom User Avatar

    not an issue a question. Generic message below:


    Seems you're "rather new" to cw, so here are some general guidelines about the comments:

    • Issue: problem in the kata itself (description, wrong tests, wrong internal solution...)
    • Suggestions: well, I guess that part is clear
    • Question anything else that is related to you having a problem solving a kata -> that's you, currently.

    When you post issues:

    • provide ALL the useful information:
      • language
      • input
      • outputs (actual expected) when relevant
      • error message when relevant
    • check, DOUBLE check that this IS an issue, meaning that the problem is in the kata itself and not in your code. If it's in your code, post rather a question
    • if you pass this step, you still have to prove/explain what the issue is (and if you can provide fixes, it's even better)

    When you post a question: well, most of the above apply too x)

    When you post code, use proper github markdown, so that it's readable.


    For your current problem, I bet you're creating a new array while you're supposed to mutate the one in the input.

    Closing, since it's not an issue.
    cheers

  • Custom User Avatar

    I'm afraid I may be misunderstanding some rule. In the console.log my array is actually showing up as reversed, but the tests are saying it's not? Any feedback, please?

  • Custom User Avatar
  • Custom User Avatar

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

  • Default User Avatar

    oh for sure, I do know it's JS... it's just that (while not the case here) I keep hearing about all kinds of IDE's where we get the "it works on my machine" bit all the time, heh

  • Custom User Avatar

    @rowcased The language is JS, Big Boy doesn't exist.

    it('Big boy is here', function () {

    He's probably talking about that.

  • Default User Avatar

    I don't know Big Boy, so I can only guess that your code only works there because Big Boy doesn't check the mutation of input, which your code does not handle.

  • Custom User Avatar

    ok but why is it ok only for big boy?

  • Default User Avatar

    you have to modify (mutate) the original array, so there is no point in declaring var a = []

  • Custom User Avatar

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

  • Custom User Avatar

    srsly u did it in 1 line? i gotta try harder...