Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I wouldn't consider using an underscore as a parameter name any simpler than any other naming convention, but it is certainly shorter. If parameter naming length is an important design consideration for you, perhaps using the arguments object instead of named parameters would be a better solution.

  • Custom User Avatar

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

  • Custom User Avatar

    That's a really good point. I hadn't noticed that. Although there should be a test to check that the result is the same array instance.

  • Custom User Avatar

    I had to modify the original JS object to get the tests to pass.
    I thought that was really bizarre. So bizarre that I couldn't tell why my solution wasn't working properly at first.

  • Custom User Avatar

    Very clean code here, well done. I was just wondering, is it necessary to create new Node instances? This seems like it might be adding additional space complexity, unnecessarily. I see a lot of other solutions out there doing this as well, and I don't mean to single you out, but your solution was listed first. I think it might be more efficient to just point the existing nodes to their new nodes instead of creating new ones. Thanks!

  • Custom User Avatar

    No problem! If you ever have any more JavaScript related questions, I'd be happy to try and help.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I appreciate your apology. I'm also sorry if I discouraged you in any way. I think you wrote a great kata, and I think that your work will help others learn and hone their skills.

  • Custom User Avatar

    I was just trying to provide some advice from my perspective. It's fine if my advice is not taken; I was just trying to help others out. I'm just not sure why people are so eager to try and disprove my opinion with purely anecdotal reasoning.

    I grew up in an upper-middle class environment with a highly-ranked public school system, and I graduated from a reputable university with a B.S. in mechanical engineering and an M.A. in economics. I never learned about these operators. The logic behind these operators is not hard to understand and I never said it was, but some people might not be aware of them when they're first beginning to learn how to program in JS. Again, I was just trying to help out others who are practicing the fundamentals of JS by attempting a problem that is pubicly catagorized as the lowest difficulty allowable on this platform.

  • Custom User Avatar

    I agree @GiacomoSorbi with your suggestion. I also think it's unreasonable to assume that the target audience for a level 8 kyu kata are exclusively people with CS degrees.

  • Custom User Avatar

    Right. Obviously, I understand that because I solved the kata, but I had to deduce that from your test cases. For a level 8 kyu kata, I would think a little bit more instruction would be warrented, at the very least to describe that logicalCalc([false, false], 'AND') produces false rather than true. It was just a suggestion.

  • Custom User Avatar

    Please add more explanation of the order of operations and/or directionality for which the user should operate. Also, please add further explanation for how false 'AND' false should behave. Thanks!

  • Custom User Avatar

    Although your description is pretty clear, I would consider adding some examples. Thanks!

  • Loading more items...