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.
same............. and OPs code is not some unreadable single line monolith, it's very elegant even.
I've learned something about regex though, thx op
had the same question and only reason I look into comment section right away. Thanks for asking and the reply.
For me it is not clearly.
What is elegant about the solution in your opinion?
Thanks a lot McBurd for your reply and effort! That actually does help and is a great in depth ressource to start with. Awesome! :)
Since you do not do anything with variable afterwards (besides returning it), there is no need to assign the result to a variable.
Brackets are character classes. They match any single character between them--specific meta characters are interpretted differently. They allow ranges such as a-z for matching the english alphabet (lowercase), for example. They also support negation by placing ^ as the first character, ie, match anything BUT the following. You might want to play around here: https://regexr.com/
So there isn't actaully a term that I know of that one could search for this specific type of assignment, however, I did find this article, which I hope helps you.
https://mariusschulz.com/blog/the-and-and-or-operators-in-javascript
does filter method assume to filter out false if no filtering condition is given?
Same! I dont see that syntax too often and I dont fully understand this.
Do you know how this syntax is called or how to look that up?
This is very very clever and clean.
I like this solution a lot
the double equal sign "==" is against JS idioms and should only
be used when actually needed.
Generally === and !== is best practice
The problem is see in this solution is that it needs to interate twice over the array.
But if height was a negative number and bigger than window, multiplying it by bounce would cause an infinite loop. I think.
This solution looks very clear and excellent to me!
May I ask: Do the square brackets prevent any content from being interpreted as Regex escape chars?
h <= 0 is not needed due to instructions
Loading more items...