I started to read several tutorials about RequireJS. In none of them was the \"define\" keyword explained satisfactorily for me. Could someone help me with the following :
I think the RequireJs API specification sums it up pretty well:
If the module has dependencies, the first argument should be an array of dependency names, and the second argument should be a definition function. The function will be called to define the module once all dependencies have loaded. The function should return an object that defines the module.
They list examples of all the various syntactic forms of defines.