What is define([ , function ]) in JavaScript?
That's probably a requireJS module definition
Check here for more details
RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code.
define() is part of the AMD spec of js
See:
- https://github.com/amdjs/amdjs-api/wiki/AMD
Edit: Also see Claudio's answer below. Likely the more relevant explanation.