Hello World in a function
def hello_world
puts "Hello World!"
end
puts "Before"
hello_world
puts "After"
Before
Hello World!
After
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
def hello_world
puts "Hello World!"
end
puts "Before"
hello_world
puts "After"
Before
Hello World!
After