Google Apps Script - Pass Anonymous Function To Menu.addItem
问题 I am building a container bound google apps script for a school. The school requires every written item to have the 'school heading'. The school uses blocks A-G as periods. My goal is that there will be a menu, 'School Heading', when opened it has the submenus 'A Block', 'B Block', 'C Block', and in each submenu there will be an option for each class, which will insert the heading for that class into the document's heading Here is my code: var BLOCKS = "abcdefg"; var CLASSES = ["English",