Differences in the two Expressions Engines
Adobe has made the documentation for syntax differences in the Legacy ExtendScript and the new JavaScript engine available.
See these links for details:
https://helpx.adobe.com/after-effects/using/legacy-and-extend-script-engine.html