×

ruby · level 1 · unit 2 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

A good name tells you what is in the box.

Ruby has rules for names. Use small letters, digits and underscores. No spaces, and never start with a digit. Start with a small letter too, because a capital at the front means something else in Ruby.

When a name needs two words, join them with an underscore, like favourite_colour. This style is called , because the words lie long and low, like a snake.

Ruby is : capital and small letters count as different, so score and Score are not the same name. Pick names that say what is inside, like pet_name, not x.

favourite_colour = "green"
puts favourite_colour

A name like x works, but in a week you will not remember what is in it.