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.
"Boom, you failed to cut the wire"
This is more riddle than coding challenge, and apparently I am bad at riddles. Can someone give me a hint?
var wireCode = 1; // Find the wire.
var Bomb = {
CutTheWire: function(wireKey) {
if (wireKey = 1) {
return;
}
},
Explode: function() { return }
}
Bomb.CutTheWire(wireCode);
Can someone provide an example of what a test looks like for this kata? Even just how to test the call in the kata description.
Here's my code:
function once(fn) {
var executed = false;
return function(variable) {
if (!executed) {
executed = true;
fn(variable);
}
}
}
I've passed the kata. Just trying to understand the guts of the call stack.
This is the line that causes the error:
addWord(addWord(list, 'how are you'), 'goodbye');
So I'm guessing that because the nested call to addWord hasn't returned 'goodbye' cannot be appended.
This comment is hidden because it contains spoiler information about the solution
Not so
My code passes all the test except for this one. It's a simple algorithm so I have no idea why it would fail for this one test.
Same here. Still hasn't been corrected
This comment is hidden because it contains spoiler information about the solution
Passed all the test cases. But when I submit I get:
TypeError: Reduce of empty array with no initial value
at Array.reduce
at Array.sum
at Array.average
at Test.it
at array
at Test.describe
The code has passed through eslint with no problem. I'm not sure what they're getting at with this
How to round in order to get the expected results?