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.
\b
matches word boundaries.pattern between // is a regular expression pattern that matches on to the string object.
in this case the pattern is 0*$ which is:
0 - is the character 0
* - is whats called quntifer, it stating how many times should the character on the
left side of it should be counted. * - zero or more times.
$ - stating that that you want to match to th end of the current string.
This comment is hidden because it contains spoiler information about the solution
Since the two arguments are both booleans we can use them directly when comparing. This solution asks if I'm
employed
and (&&
) not (!
) onvacation
. Since this is Ruby, the last executed line in a method is automatically returned.