Weekly tips

Squadracer shares a tip every week. We start this series in Ruby!

for loop

Ruby also has a for loop!

Alexandre Borderes
Alexandre Borderes

fill

To fill an array

Alexandre Borderes
Alexandre Borderes

&.

Reduce the « 1 billion dollar mistake »!

Alexandre Borderes
Alexandre Borderes

_1, _2, ... it?

Numbered parameters

Alexandre Borderes
Alexandre Borderes

yield_self / then

For method chaining

Alexandre Borderes
Alexandre Borderes

+"string"

Mutable string

Alexandre Borderes
Alexandre Borderes

__END__

A little more than a comment

Alexandre Borderes
Alexandre Borderes

IRB assembly

Ruby in your browser

Alexandre Borderes
Alexandre Borderes