First page Back Continue Last page Overview Graphics
puts „Hello World!“
Some data types in Ruby:
- String: 'Surely some revelation is at hand'
- Numeric: 42, -100, 3.14
- Array: [1, 'two', Person.new, nil, [3, 4]]
- Hash: {:name => 'me', :age => 33}
- Regexp: /^\d{4}-\d{2}-\d{2}$/
- Range: 1..10, 'a'...'f'
- Boolean: true, false (and everything else)
... but these are syntactic sugar