ruby-uebungen/Assignment_004/solution/readme.md

16 lines
151 B
Markdown
Raw Normal View History

2023-05-23 09:19:31 +02:00
# Lösung: Parallele Zuweisung
2023-05-25 17:49:42 +02:00
2023-05-23 09:19:31 +02:00
```ruby
def swap(a, b)
[ b, a ]
end
x ="Hallo"
y = "Welt"
puts "#{x} #{y}"
x, y = swap(x, y)
puts "#{x} #{y}"
```