Question: I had a question about the return statement that is by itself in the control flow.

```
var rockPaperScissors = function(n) {  
    var rounds = n;
    var results = [];

    var weapons = ['rock', 'paper', 'scissors'];

    var recurse = function(roundsLeft, played) {
        if( roundsLeft === 0) {
            results.push(played);
            return;
        }

        for(var i = 0; i<weapons.length; i++) {
            var current = weapons[i];
            recurse( roundsLeft-1, played.concat(current) );
        }
    };

    recurse(rounds; []);
    return results;
}

```

I was wondering why the return statement is not written as:

```
return results.push(played);

```

Is there any benefits? If so, why and when should you write it that way?

Answer: 
It's a bit convoluted, but not too bad. Basically you need to use the menu's `FindItem` method, which takes the string name of the menu item. This returns its id, which you can then use the menu's `FindItemById` method for. Here's a quick and dirty example:

```
import wx

########################################################################
class MyForm(wx.Frame):
    """"""

    #----------------------------------------------------------------------
    def __init__(self):
        """Constructor"""
        wx.Frame.__init__(self, None, title="wx.Menu Tutorial")

        self.panel = wx.Panel(self, wx.ID_ANY)

        # Create menu bar
        menuBar = wx.MenuBar()

        # create check menu
        checkMenu = wx.Menu()
        wgItem = checkMenu.Append(wx.NewId(), "Wells Fargo", "", wx.ITEM_CHECK)
        self.Bind(wx.EVT_MENU, self.onFargo, wgItem)
        citiItem = checkMenu.Append(wx.NewId(), "Citibank", "", wx.ITEM_CHECK)
        geItem = checkMenu.Append(wx.NewId(), "GE Money Bank", "", wx.ITEM_CHECK)
        menuBar.Append(checkMenu, "&Check")

        # Attach menu bar to frame
        self.SetMenuBar(menuBar)

    #----------------------------------------------------------------------
    def onFargo(self, event):
        """"""
        menu = event.GetEventObject()
        item_id = menu.FindItem("Wells Fargo")
        item = menu.FindItemById(item_id)
        print item.IsChecked()

#----------------------------------------------------------------------
# Run the program
if __name__ == "__main__":
    app = wx.App(False)
    frame = MyForm().Show()
    app.MainLoop()

```
Use the event to access the data you want. 

```
print event.Id
print event.Selection # returns 1 if checked 0 if not checked 
print event.IsChecked() # returns True if checked False if not checked

```

print out all of the attributes with:

```
print dir(event)

```