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.
I guess the author of the comment already knows, but let it stay for new people.
for a person who does not know what this code is for, he has no idea what the number 40 is.
in this case, the constant is used for two reasons in bussines case,
1 instead of a comment,
2 if you update the price list, you change it in one place, not in several.
the same if 'd' was 'days' a new person immediately knows what the code is for.
I also forgot about destructuring as well. However, it does work without destructuring. I think you forgot to initialize your accumulator. You need to add the
,0
after the function to initialize the accumulator. Hope that helps!Must have forgotten, Good call. Luckily you were quick to fix my mistake!
whoever voted this best practices is a goon lol. Its clever though thats for sure.
Hi, you should know that comments on solutions are visible unless you use the spoiler tag (which I just added to the comment), otherwise you just flat-out gave away the solution, which is forbidden.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Never before has a comment been so correct. lol.
I solved it this way, knowing that it was probs going to be the top solution (since the top answer is typically the most clever/clean answer, not always the most efficient). That being said, I've never flip-flopped my oppinion about my answer so many times while reading a discorse on codewars before... lol. It's 8kyu and we're all overthinking the crap out of it.
Do some research on regex (regular expressions). It kind of feels like it's own language at first, but its totally worth learning because of how easy it makes parsing/searching/manipulating strings.
What... You don't like that garbled mess of numbers and parentheses? lol
Write code correctly and then better.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Yep. Confused the ["A","A"] test case, with the ["A","2","A","9","9"] test case... My appologies!
Should have known that a Kata thats been around this long wouldnt have faulty test cases that obvious.
Loading more items...