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.
https://www.rubyguides.com/2018/11/attr_accessor/
Already mentioned in description and initial solution setup's comment
Today I learned, again and again
For some reason I didn't understand this. In the end I did it through laziness.
Great problem-solving skills!
I don't understand, I think I wrote exactly the same but it didn't work, ha-ha
dang this has convinced me to always write out a 1-10 list of inputs -> outputs now...
Twinning!
I find it quicker to type strings in template Literals/Grave Accent in my code.
Nice work!
This approach is not good. It changes the parameter if it has a falsy value, for example if an empty string were passed to firstName or lastName, it would be changed to the default value, which is incorrect. The correct way is to use default parameters.
I don't think I was aware of the default parameter feature when I solved this. If I were to solve it again I would use default parameters.
What's the benefits of this approach over the top solution?
ie. assigning fields directly inside body vs. exposing them as default paramters.
...damn.
Works on every version of Python, best practices in any case.
we are supposed to fix the code!!! NOT write a new one....
This comment is hidden because it contains spoiler information about the solution
Loading more items...