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 comment is hidden because it contains spoiler information about the solution
Please do not just post chatGPT explanations here. It's basically just the code in plain text and should at least have the spoiler flag.
This comment is hidden because it contains spoiler information about the solution
If you still need the solution. Check the order of your phrases.
Because it's not a wilson prime.
I really enjoy the effort you put into formatting your comments. Please take this humble thumbs up
👍
yeah ) kinda
.match
returns null if it found nothing, and you don't want that. You want to return 0 in that case, hence the 0 at the end.If you're talking about the syntax, it's called Ternary Operator. Basically it returns the left side of the
:
if the condition is truthy, or the right side of the:
if the condition is falsy.This comment is hidden because it contains spoiler information about the solution
You can't, but don't worry about it, just don't do it again and that'll be fine. Make sure you read the DOCs: https://docs.codewars.com/
Not a kata suggestion, and please, don't discuss solutions in Discourse, do it in Solutions.