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.
This comment is hidden because it contains spoiler information about the solution
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.This comment is hidden because it contains spoiler information about the solution
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.
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.
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!
No problem! If you ever have any more JavaScript related questions, I'd be happy to try and help.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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.
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.
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.
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')
producesfalse
rather thantrue
. It was just a suggestion.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!Although your description is pretty clear, I would consider adding some examples. Thanks!
Loading more items...