s="testing"
, show two distinctly different expressions
s[...]
and the value produced by each.
nil
.
EC 1 ½ point: In the terminology of Ruby, what is the "receiver"?
EC 2 ½ point: Within ten days, what day of the year is Ruby's birthday?
s="testing"
, show two distinctly different expressions
s[...]
and the value produced by each.
s[0] => "t"
, s[0,4] => "test"
nil
.
nil
is good enough. ""[0]
works, too.
EC 1 ½ point: In the terminology of Ruby, what is the "receiver"?
s
in s.size
.
EC 2 ½ point: Within ten days, what day of the year is Ruby's birthday?