Keyboard shortcuts

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

Simple function

def compute_area(width, height)
  area = width * height
  return area
end


a = compute_area(2, 3)
puts a


b = compute_area(4, 5)
puts b