Les types en ruby

String

name = 'Ned'

Integer

age = 60

Float

height = 1.85

Array

children = ['Todd', 'Rod']

Hash

ned = {name: 'Ned', age: 60}
ned[:name]

Symbol

religion = :christianity

Débutant 02 | Ned - Les types en ruby

By aghaniyassin

Débutant 02 | Ned - Les types en ruby

  • 1,202