How can I offset this array so it only outputs every ten numbers?
(0...40)
[10,20,30,40]
Use the step
method for this:
10.step(40,10)
The first argument is the number you want to count up to, with the second argument being the "steps" that you take to get there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With