About export function()

Hi all! Does anyone know where I need to read about the “export”? I’m still very new to wix code and I don’t quite get what it does…

Thanks in advance

2 Likes

Surely someone must know what “export” is and able to explain it to me?

bump

Shiro, this is a definition from the Mozilla Developer site:

https://developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export

I’ll give you my two cents about its relevance to Corvid/Wix coders. When you create a backend module function without the export statement, it cannot be called by front-end page code. Exporting makes it available.

I’m sure there is more to it than that. For instance, why did the creators of Wix Code/Corvid decide to automatically include the export statement on functions that one creates via a property sheet when an element is selected? I don’t have an answer for that.

Ah, that makes sense. Thank you!

so in the page code do i have to use the function with export function