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.
My advice is to look into 'type coercion' and while you're at it, 'type conversion' and figure out the difference. It's quite interesting stuff.
how and why does this work ?
Thank you!
This comment is hidden because it contains spoiler information about the solution
If you surround your code with three backticks (```), it will put it in a codeblock, which is far easier readable.
See: https://docs.codewars.com/references/markdown#displaying-code
This comment is hidden because it contains spoiler information about the solution
Added PHP 8.0 support
This also fixes a bug in the solution (see comment on the fork)
Interesting I haven't seen forEach used this way
tests are weak (JS), edge cases like "89,179", "80, 180.0001", "-90,180", etc. should be tested. I've passed with regex that would not work correctly for such edge cases
all tests passes except "99.234, 12.324" and some rendom tests that disappear
but it passed on regex debugger websites and my local machine!
there must be something wrong with tests
Yeah, that caught me off guard too. The description needs a bit of rework.
Because it's easier to do so? If it's solely a number problem then yes, math would be easier. But this kata is more about formatting rather than number checking.
Now it's 6 Kyu :)
Array of coordinates? You only given 1 coordinate per function call.
Slow down buddy. If this feels to much for you, do some easier regex kata first.
Loading more items...