title: How to know which menu item was clicked?
body: <p>I'm creating a dynamic custom menu from REST call in google spreadsheet. With every call I receive different sports that I want to use as menu items</p>
  
  <pre><code>  // sample sports array
    var menuItemsArr = ['Footbal', 'Tennis', 'Swimming'];
  
    var menu = SpreadsheetApp.getUi().createMenu("Sports");
    for (i in menuItemsArr){
        menu.addItem(menuItemsArr[i],'createSheet')
         .addSeparator()
    }
    menu.addToUi();
  </code></pre>
  
  <p>When the user clicks on menu item I want to create a new sheet with title - the sport that was clicked. So if the user choose Tennis I want to create a sheet with name Tennis.</p>
  
  <p>Is it possible to know which menu item was clicked (to take the name of the item (Tennis) somehow, or at least the index of the menu item that was clicked?</p>
  
  <p>Any help will be appreciated! Thanks.</p>