Do you mean in the addon SDK? The sample addons have code that includes a custom script interface, e.g. here which defines IMySingleGlobalInstance exposed to Construct's JavaScript coding.
If you mean just when writing your own JavaScript code... sure, just use classes, modules etc.