See column 10, Navigator Jigsaw Puzzle , for a detailed discussion. Suffice to say that it accepts up to two arguments. A mandatory first, integer, argument specifies the wrapping width of the new element. The second, optional argument, specifies the parent element of the new element. That is, the element that contains the new element.
Menus have no containing element.
They are contained in the window object. Items are contained in menus. For the first time, in these columns, we use the arguments property of functions. Using this property we can direct our functions to execute different statements depending on the number of arguments received. In our case, we check for a second argument.