SP.SOD is a nice feature of SharePoint, but how should I use it? For example, I use these lines of code
ExecuteOrDelayUntilScriptLoaded(function () {
//code
}, "custom.js");
If I understand correctly this code will be invoked when custom.js is loaded. There are several functions that can load this script. For example
SP.SOD.executeFunc('custom.js', null, callbackfunction)
What the best practice to use SP.SOD.executeFunc and ExecuteOrDelayUntilScriptLoaded together?