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.
lol i wrote the same code
Bc the office value always needs to be incremented and should therefore not be included in the conditional code.
the home value is only reduced if an umbrella already was waiting there to be taken with.
Is someone able to explain why this works if you don't use curly brackets on the if (home) and (office) statement but works if you leave them out?
eg:
if (home) {
home--
office++
}