Skip to content
Justice Tech School

Variables and Constants

Local variables start with a lowercase letter. Constants start with a capital. Ruby has no type declarations.

Example
name = "Ada"
age = 30
MAX = 100
puts "#{name} #{age} #{MAX}"

Result

Ada 30 100

Exercise

Constant name style.

 = 5

Quiz Test

How do constants start?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.