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

Copy of Débutant 02 | Ned - Les types en ruby

By juliegarnier

Copy of Débutant 02 | Ned - Les types en ruby

  • 857