Ruby Tutorial

Ruby Syntax

Ruby Syntax

Every Ruby program has rules for how statements are written and executed.

  • Follow Ruby syntax rules for statements and blocks
  • Use comments to document code
  • Run examples in the Try it editor

Example

name = "Sturdee"
puts name
Try it Yourself
Run this RUBY example in your local environment or course sandbox.