We definitely need to improve our docs;)
However I'd recommend always looking in the ZAP User Guider first - this is included with ZAP and accessible from the menus, toolbar and F1 key.
Its also available online here:
https://github.com/zaproxy/zap-core-help/wikiThe online version is generated from the same source files - we include the help with ZAP for users who cant access the internet (not at all uncommon for pentesters 'onsite') and the online version so we can link to it.
In this particular case the global variables are documented under the 'Scripts' addon:
https://github.com/zaproxy/zap-core-help/wiki/HelpAddonsScriptsScripts#global-variablesYou can search the local help for any terms you need to look up, but you do need to guess the right terms;)
Cheers,
Simon