Variables. A name that holds a value. There are three keywords: var, let and const. Use var in GTM Custom JavaScript variables, because it is safe in older browsers. Use const in code on your own site.
Functions. A wrapper around some work, which you can call by name. A GTM Custom JavaScript variable is always a function, and it must return something.