What is the difference between define and require , and when should I use each of them? I read various answers on Stack Overflow, but I still have not been able to understand.
For example, if it was on main.js (points are required in the configuration file), what is the difference?
define(["jquery"], function($) { do something with $ }); require(["jquery"], function($) { do something with $ });
Is $/jQ guaranteed to be loaded and ready in both?
Adi
source share