Assign constant array value to three variables : Variables « Language Basics « Ruby
- Ruby
- Language Basics
- Variables
Assign constant array value to three variables
a, b, *c = [12, 14, 178, 89, 90]
puts a # => 12
puts b # => 14
puts c # => [178, 89, 90]
Related examples in the same category