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.
doh! thank you
thanks for the translation, but
getting a lot of InvalidBond and UnlockedMolecule is not defined errors in what appears to be the Test Suite. Forgive me if I am just being stupid.
ReferenceError: UnlockedMolecule is not defined
at Test.it
at begin
at Object.it
at Test.describe
at /runner/frameworks/javascript/cw-2.js:159:11
at Promise._execute
at Promise._resolveFromExecutor
at new Promise
at Object.describe
at /home/codewarrior/index.js:738:6
at /home/codewarrior/index.js:1319:5
at Object.handleError
congratulations
not correct but well done on passing the tests
so maybe clever, but not best practice
This comment is hidden because it contains spoiler information about the solution
It would be good to know whether or not this is a chai incompatibility error, or whether it is a requirement for the task that Thing not have anything using Symbols...:hmm?
Yup, I too am at this point.
true enough, but at time of writing the code, default parameters threw out the syntax highlighting on codewars
I agree that this needs more tests
How is it possible to log to the console, as per javascript Console.log()
I see that:
System.out.println()
yields something that the codewars environment can see, but i cannot see the result in the console. This makes it much harder to test stages of function development
I liked this a lot, and the previous one. But I have a question. For the tests, being quite small, it doesn't matter if you collect and verify the order of all the incoming packets first and then run the callbacks on all of them, or if you run the callbacks on each incoming packet as soon as they are validated as non-repeats and in order.
For this and the next, it is easier to program if you can collect all packages first and then process them, and then run the callbacks, but in a real network, in which i can easily imagine millions of packets being sent in a large file, this approach might be quite slow (actually i don't know anything about networks!)
So which is the intended approach to the problem here? Or is there no meaningful difference?
Cheers!
nice, i like the json solution much more than the string modifier solutions (such as my own)
it's a lot more robust
This took at least twice as long to figure out the correct way to handle leading and trailing zeros as it did to figure out the main logic of the challenge!
Why did you choose to make it so that the original object must be mutated?
What's wrong with using copies of the object?
Edit: after passing it is as i suspected because the testing needs the original object reference
still IMO, i think this is not a good reason. The trend in js object handling after all seems to be to learn to avoid mutations
other than that, nice kata. good for the level
Loading more items...