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.
All classes come from some super class, you need to lookup ancestors also lookup the RUBY docs, Integer inherits methods from its superclasses.
class numeric has step method
I am new to Ruby - I'd expect the
min
parameter to be an integer, but the integer class doesn't have astep
method. What gives?https://ruby-doc.org/core-2.5.0/Integer.html
Still missing picture.
yup, having
1..n
creates arange
from1
ton
(inclusive). You can check out https://ruby-doc.com/core-2.4.7/Range.html for more info on them.does your i in this example start at 1 due to (1..n)? Cause I use Array.new and have to use (n - 1 - i)
Very readable! Helped me reflect on my solution and see a new way of doing things. Thanks :)