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 am not an expert in regex, but if I understand
[^#] means not a #
? means match the previous token [^#] zero or one time
literally match the character
So altogether, find a character that is NOT # followed by a #. Then if found, the author just replaces that with ''.
This comment is hidden because it contains spoiler information about the solution
Hi and thx for the solution! I'm struggling to get the point of
if ((! o1) || (! o2)) return true;
🤔 Can you explain?Super neat!! But struggling to figure out what's happening there /[^#]?#/, is it either something that doesn't start with # or nothing and then #?
This comment is hidden because it contains spoiler information about the solution
Recursion is beauty here!
Super not DRY... But really not sure how to get these for loops not be repeated though they look so similar
haha! I'm super beginner and have to say... I'm absolutely clueless here, apart from using loops but these are forbidden here.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks so much for going the extra mile and showing the solution using class. I was struggling in particular to give the method averageWeight to the class only and not the instances, so great to lear about 'static' keyword.
Obviously special mention to the conclusion ^^
Very nice kata overall, wasn't getting the point of IIFE before that, pretty cool example for using it combined with closures.
prev is only here to ensure the while loop will stop. The moment there're no more valid brace couples, both prev and str will have same length, hence stopping loop.
I don't think we can use length method since "Usual builtins have been deactivated. Don't count on them." I couldn't solve it in a timely manner without it though 🤔
This comment is hidden because it contains spoiler information about the solution