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.
This shortcut is often referred to as an "immediate array access" or "anonymous array declaration with immediate access". It's a concise way to define an array inline and immediately access a specific element from it without assigning it to a variable first. It's commonly used in situations where a temporary array is needed for a single operation.
What is this kind of shortcut?
what does the [...this].eqAll() mean? if someone could break this down on what is going on that would be great! thanks in advance.
I had thought a workaround regarding turning the array into a string, apply the reverse on it and then turn it back into an array.
But since this exists on PHP, no real need. Just for the fun of tinkering around with it.
In the task it wasn't said explicitly about the case if we are given ['a', 'b'] array, I would think that the function should return 'c', but still this solution could be easily adapted for that case also. Really elegant, wp!
This is genius :)
this test you've contrived does not align with the kata task description
This solution looks interesting but I'm no math genius, can anyone explain how it works to me?
I was caught by such unexpected behavior. Should be edited, imho.
it could be better to have is_numeric($n) && $n == 0
The problem is with the apostrophes. There are no test cases with apostrophes at the beginning or end of a word, thus this passes.
Когда вы умножаете девять на любое другое число, результат всегда будет уменьшаться до девяти, когда вы складываете цифры вместе. Магия.
Thanks!
hello professor
This comment is hidden because it contains spoiler information about the solution
Loading more items...